Pidgeot / python-lnp

Cross-platform re-implementation of the Lazy Newb Pack launcher.
ISC License
65 stars 10 forks source link

OSX crash #64

Closed Pidgeot closed 4 years ago

Pidgeot commented 4 years ago

Crash when the the launcher finds an "empty" folder in LNP/graphics.

Traceback (most recent call last): File "lnp.py", line 790, in PyLNP() File "lnp.py", line 83, in init TkGui(self) File "/Macnewbie_9.7/Macnewbie/tkgui.py", line 530, in init self.read_graphics() File "/Macnewbie_9.7/Macnewbie/tkgui.py", line 1115, in read_graphics self.graphics.set(tuple([p[0] for p in self.lnp.read_graphics()])) File "lnp.py", line 248, in read_graphics self.graphics_dir, p, 'data', 'init', 'init.txt'), 'FONT') File "/Macnewbie_9.7/Macnewbie/settings.py", line 240, in read_value settings_file = open(filename) IOError: [Errno 2] No such file or directory: u'./LNP/Graphics/FONT COLLECTION/data/init/init.txt'

I used the latest source, because v2.app crashes on OSX on launch even when deleting this folder.

[Issue created by fricy: 2014-08-21]

[Comment created by Pidgeot: 2014-08-21] Return None in DFConfiguration.read_value if an IOError occurs (e.g. file does not exist) (fixes #12)

→ <>