[SCM] morituri/master: Use os.path.join instead of hardcoded paths
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:10:01 UTC 2014
The following commit has been merged in the master branch:
commit d882f845ffa5025e741ab91fcb36e5055a2dd568
Author: Nicolas Cornu <nicolac76 at yahoo.fr>
Date: Tue Feb 26 21:17:38 2013 +0100
Use os.path.join instead of hardcoded paths
diff --git a/morituri/common/directory.py b/morituri/common/directory.py
index 66fb510..e076a1f 100644
--- a/morituri/common/directory.py
+++ b/morituri/common/directory.py
@@ -34,7 +34,7 @@ class Directory(log.Loggable):
path = os.path.join(directory, 'morituri.conf')
self.info('Using XDG, configuration file is %s' % path)
except ImportError:
- path = os.path.expanduser('~/.moriturirc')
+ path = os.path.join(os.path.expanduser('~'), '.moriturirc')
self.info('Not using XDG, configuration file is %s' % path)
return path
@@ -45,7 +45,7 @@ class Directory(log.Loggable):
path = BaseDirectory.save_cache_path('morituri')
self.info('Using XDG, cache directory is %s' % path)
except ImportError:
- path = os.path.expanduser('~/.morituri/cache')
+ path = os.path.join(os.path.expanduser('~'), '.morituri', 'cache')
if not os.path.exists(path):
os.makedirs(path)
self.info('Not using XDG, cache directory is %s' % path)
@@ -68,7 +68,7 @@ class Directory(log.Loggable):
except ImportError:
pass
- path = os.path.expanduser('~/.morituri/cache')
+ path = os.path.join(os.path.expanduser('~'), '.morituri', 'cache')
if os.path.exists(path):
self.info('From before XDG, read cache directory is %s' % path)
paths.append(path)
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list