Skip to content

Commit b69539c

Browse files
committed
Tweaking code to find default location of the database
It turns out that this bit of code was correct, but hopefully now it's clearer. It's still pretty confusing where this is set, and in what priority. (eg. the .rmgrc config file). I'm not sure why the prior one seems to work in other places
1 parent 7495557 commit b69539c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rmgpy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def reset(self):
139139
Reset all settings to their default values.
140140
"""
141141
self.filename = None
142-
working_dir = os.path.abspath(os.path.dirname(__file__))
143-
self['database.directory'] = os.path.realpath(os.path.join(working_dir, '..', '..', 'RMG-database', 'input'))
142+
rmgpy_module_dir = os.path.abspath(os.path.dirname(__file__))
143+
self['database.directory'] = os.path.realpath(os.path.join(rmgpy_module_dir, '..', '..', 'RMG-database', 'input'))
144144
self.sources['database.directory'] = 'Default, relative to RMG-Py source code'
145145

146146
# The global settings object

0 commit comments

Comments
 (0)