pyneighborhood team mailing list archive
-
pyneighborhood team
-
Mailing list archive
-
Message #00149
[Branch ~pyneighborhood/pyneighborhood/devel] Rev 538: Fixed #665030
------------------------------------------------------------
revno: 538
committer: Stefan J. Betz <info@xxxxxxxxxxxxxxx>
branch nick: pyneighborhood
timestamp: Fri 2010-10-22 12:13:57 +0200
message:
Fixed #665030
modified:
pyneighborhood/__init__.py
--
lp:pyneighborhood
https://code.launchpad.net/~pyneighborhood/pyneighborhood/devel
Your team pyNeighborhood is subscribed to branch lp:pyneighborhood.
To unsubscribe from this branch go to https://code.launchpad.net/~pyneighborhood/pyneighborhood/devel/+edit-subscription
=== modified file 'pyneighborhood/__init__.py'
--- pyneighborhood/__init__.py 2010-09-28 18:56:46 +0000
+++ pyneighborhood/__init__.py 2010-10-22 10:13:57 +0000
@@ -58,15 +58,15 @@
if version_info >= (2,4,1):
register_adapter(str, lambda s:s.decode('utf-8'))
+config = SafeConfigParser()
+config.readfp(StringIO(DEFAULT_CONFIG))
+
if not isdir(homeconfdir()):
push_notification(_("Creating config directory...\n"), level=1)
mkdir(homeconfdir())
-config = SafeConfigParser()
-
if not access(homeconfdir() + "/config", F_OK):
push_notification(_("Creating Default Config...\n"), level=1)
- config.readfp(StringIO(DEFAULT_CONFIG))
config.set("Main", "mount_directory", environ["HOME"] + "/pyNeighborhood")
f = file(homeconfdir() + "/config", "w")
config.write(f)
@@ -75,7 +75,6 @@
del f
chmod(homeconfdir() + "/config", S_IRUSR + S_IWUSR)
else:
- config.readfp(StringIO(DEFAULT_CONFIG))
config.read(homeconfdir() + "/config")
if not isdir(config.get("Main", "mount_directory")):