rev 3666 - debbugs-illa/bzlink
Pierre Habouzit
madcoder at costa.debian.org
Wed Apr 26 13:58:25 UTC 2006
Author: madcoder
Date: 2006-04-26 13:58:24 +0000 (Wed, 26 Apr 2006)
New Revision: 3666
Modified:
debbugs-illa/bzlink/__init__.py
Log:
create a dotdir for config files, cache, ...
Modified: debbugs-illa/bzlink/__init__.py
===================================================================
--- debbugs-illa/bzlink/__init__.py 2006-04-26 13:04:20 UTC (rev 3665)
+++ debbugs-illa/bzlink/__init__.py 2006-04-26 13:58:24 UTC (rev 3666)
@@ -47,10 +47,16 @@
class _BzlinkConfig:
def __init__(self):
+ self._dotdir = os.path.expanduser('~/.bzlink/')
+ if not os.path.exists(self._dotdir):
+ os.mkdir(self._dotdir)
self._cfg = RawConfigParser()
- self._cfg.read(['/etc/bzlink.cfg', './bzlink.cfg', os.path.expanduser('~/.bzlinkrc')])
+ self._cfg.read(['/etc/bzlink.cfg', './bzlink.cfg', self._dotfile('bzlink.cfg')])
self._section = None
+ def _dotfile(self, name):
+ return os.path.join(self._dotdir, name)
+
def setSection(self, section):
if not self._cfg.has_section(section):
raise NoSuchSection(section)
More information about the pkg-kde-commits
mailing list