diff --git a/fightsticker/fightstick.py b/fightsticker/fightstick.py index 7d60b01..04ac98b 100644 --- a/fightsticker/fightstick.py +++ b/fightsticker/fightstick.py @@ -112,8 +112,11 @@ def load_configuration(): def save_configuration(): - with pyglet.resource.file('layout.ini', 'w') as file: - config.write(file) + try: + with pyglet.resource.file('layout.ini', 'w') as file: + config.write(file) + except OSError: + pass ######################### diff --git a/fightsticker/fightstick_hb.py b/fightsticker/fightstick_hb.py index ba8618c..94b241e 100644 --- a/fightsticker/fightstick_hb.py +++ b/fightsticker/fightstick_hb.py @@ -118,8 +118,11 @@ def load_configuration(): def save_configuration(): - with pyglet.resource.file('layouthb.ini', 'w') as file: - config.write(file) + try: + with pyglet.resource.file('layouthb.ini', 'w') as file: + config.write(file) + except OSError: + pass #########################