[weboob] [PATCH 1/1] Fix path building for config dir and data dir

Olivier Schwander olivier.schwander at ens-lyon.org
Thu Feb 16 21:07:49 CET 2012


The paths are now correctly built in the case where $XDG_DATA_HOME and
$XDG_CONFIG_HOME are not empty: the "weboob/" suffix was in the fallback
argument of the os.get.environ.

Signed-off-by: Olivier Schwander <olivier.schwander at ens-lyon.org>
---
 weboob/core/ouiboube.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/weboob/core/ouiboube.py b/weboob/core/ouiboube.py
index 5241306..0fc9d39 100644
--- a/weboob/core/ouiboube.py
+++ b/weboob/core/ouiboube.py
@@ -58,8 +58,8 @@ class Weboob(object):
             datadir = workdir = os.environ.get('WEBOOB_WORKDIR')
         else:
             old_workdir = os.path.join(os.path.expanduser('~'), '.weboob')
-            xdg_config_home = os.environ.get('XDG_CONFIG_HOME', os.path.join(os.path.expanduser('~'), '.config', 'weboob'))
-            xdg_data_home = os.environ.get('XDG_DATA_HOME', os.path.join(os.path.expanduser('~'), '.local', 'share', 'weboob'))
+            xdg_config_home = os.path.join(os.environ.get('XDG_CONFIG_HOME', os.path.join(os.path.expanduser('~'), '.config')), 'weboob')
+            xdg_data_home = os.path.join(os.environ.get('XDG_DATA_HOME', os.path.join(os.path.expanduser('~'), '.local')), 'share', 'weboob')
 
             if os.path.isdir(old_workdir):
                 self.logger.warning('You are using "%s" as working directory. Files are moved into %s and %s.'
-- 
1.7.9




More information about the weboob mailing list