diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index 0ce87b47..9b3b7f0b 100644 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -104,6 +104,11 @@ def get_config(file_name, fallback = True): # the config directory for us so there's no need to check it # again example_path = '/usr/share/python-fpdb/' + file_name + '.example' + if not os.path.exists(example_path): + if os.path.exists(file_name + '.example'): + example_path = file_name + '.example' + else: + example_path = "pyfpdb/" + file_name + '.example' if not config_found and fallback: try: shutil.copyfile(example_path, config_path) @@ -735,7 +740,7 @@ class Config: #sys.exc_info = (, ExpatError('not well-formed (invalid token): line 511, # column 4',), ) - if not self.example_copy and example_file is not None: + if (not self.example_copy) and (example_file is not None): # reads example file and adds missing elements into current config added = self.add_missing_elements(doc, example_file)