From b3841d67ae1a0ae62fef4adf1448b8fdc13aa703 Mon Sep 17 00:00:00 2001 From: Robert Cox Date: Sat, 23 Jan 2021 18:46:47 +0000 Subject: [PATCH] Hotfix - DCS Input file crash --- setup.py | 2 +- src/adaptors/dcs_world.py | 3 ++- src/version.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index eb7718a..d649146 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ setup( name='Joystick Diagrams', - version='1.0.0', + version='1.2.1', description='Automatically create diagrams for your throttles, joysticks and custom HID devices', long_description=long_description, long_description_content_type='text/markdown', diff --git a/src/adaptors/dcs_world.py b/src/adaptors/dcs_world.py index 48b43a4..9efa499 100644 --- a/src/adaptors/dcs_world.py +++ b/src/adaptors/dcs_world.py @@ -53,7 +53,8 @@ def __validateProfile(self, item): Return Valid Profile ''' #TODO add additional checking for rogue dirs/no files etc - if 'joystick' in os.listdir(os.path.join(self.path, 'Config', 'Input', item)): + + if os.path.isdir(os.path.join(self.path, 'Config', 'Input', item)) and 'joystick' in os.listdir(os.path.join(self.path, 'Config', 'Input', item)): return os.listdir(os.path.join(self.path, 'Config', 'Input', item, 'joystick')) else: return False diff --git a/src/version.py b/src/version.py index a875311..2fbf3f7 100644 --- a/src/version.py +++ b/src/version.py @@ -1 +1 @@ -VERSION = "1.2.0" \ No newline at end of file +VERSION = "1.2.1" \ No newline at end of file