r13208 - in packages/trunk/snowballz/debian: . patches
Paul Wise
pabs at alioth.debian.org
Sat Feb 4 07:36:38 UTC 2012
Author: pabs
Date: 2012-02-04 07:36:38 +0000 (Sat, 04 Feb 2012)
New Revision: 13208
Added:
packages/trunk/snowballz/debian/patches/use-os-path-expanduser.patch
Modified:
packages/trunk/snowballz/debian/changelog
packages/trunk/snowballz/debian/patches/series
Log:
Use os.path.expanduser in case HOME is unset
Modified: packages/trunk/snowballz/debian/changelog
===================================================================
--- packages/trunk/snowballz/debian/changelog 2012-02-04 07:11:36 UTC (rev 13207)
+++ packages/trunk/snowballz/debian/changelog 2012-02-04 07:36:38 UTC (rev 13208)
@@ -17,6 +17,7 @@
* Switch the homepage to the newish upstream one (LP: 889075)
* Close the launchpad bug for #585118 in the changelog
* Clean up the patches
+ * Use os.path.expanduser in case HOME is unset
-- Dean Evans <dean at codemonkies.net> Sat, 04 Feb 2012 17:12:36 +1300
Modified: packages/trunk/snowballz/debian/patches/series
===================================================================
--- packages/trunk/snowballz/debian/patches/series 2012-02-04 07:11:36 UTC (rev 13207)
+++ packages/trunk/snowballz/debian/patches/series 2012-02-04 07:36:38 UTC (rev 13208)
@@ -1,3 +1,4 @@
typeerror_crash.patch
list_nohash.patch
res_config_check.patch
+use-os-path-expanduser.patch
Added: packages/trunk/snowballz/debian/patches/use-os-path-expanduser.patch
===================================================================
--- packages/trunk/snowballz/debian/patches/use-os-path-expanduser.patch (rev 0)
+++ packages/trunk/snowballz/debian/patches/use-os-path-expanduser.patch 2012-02-04 07:36:38 UTC (rev 13208)
@@ -0,0 +1,29 @@
+Author: Paul Wise <pabs at debian.org>
+Description: Use os.path.expanduser in case HOME is unset
+Forwarded: no
+Last-Update: 2012-02-04
+
+--- a/settings.py
++++ b/settings.py
+@@ -52,16 +52,11 @@
+
+
+ def get_config_path():
+- pathname = ""
+- try:
+- pathname = os.path.join(os.environ["HOME"], ".snowballz")
+- except:
+- try:
+- pathname = os.path.join(os.environ["APPDATA"], "SnowballZ")
+- except:
+- print "Couldn't get environment variable for home directory"
+- pathname = "."
+- return pathname+".ini"
++ if 'APPDATA' in os.environ:
++ pathname = os.path.join(os.environ["APPDATA"], "SnowballZ.ini")
++ else:
++ pathname = os.path.expanduser('~/.snowballz.ini')
++ return pathname
+
+
+ def load_config():
More information about the Pkg-games-commits
mailing list