Fix: properly set self.config_file

This commit is contained in:
Emanuele 2020-12-13 01:29:00 +01:00
parent 76505e759d
commit 7e2e9444b6

View file

@ -42,9 +42,10 @@ class rMViewApp(QApplication):
log.info("Searching configuration in " + ', '.join(config_files)) log.info("Searching configuration in " + ', '.join(config_files))
for f in config_files: for f in config_files:
try: try:
with open(os.path.expanduser(f)) as config_file: f = os.path.expanduser(f)
with open(f) as config_file:
self.config = json.load(config_file) self.config = json.load(config_file)
self.config_file = config_file self.config_file = f
log.info("Fetching configuration from " + f) log.info("Fetching configuration from " + f)
break break
except json.JSONDecodeError as e: except json.JSONDecodeError as e: