[gobject-introspection] giscanner/cachestore.py: Clean up a bit
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner/cachestore.py: Clean up a bit
- Date: Fri, 1 Aug 2014 07:26:24 +0000 (UTC)
commit 3701b320a53de2920ffb96982b40d8204d95d504
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Jul 30 14:07:36 2014 +0800
giscanner/cachestore.py: Clean up a bit
Use the special os.path.expanduser('~'), as it it more portable, instead of
quering the HOME or HOMEPATH envvar.
https://bugzilla.gnome.org/show_bug.cgi?id=732668
giscanner/cachestore.py | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/giscanner/cachestore.py b/giscanner/cachestore.py
index bcac078..0dbf1fb 100644
--- a/giscanner/cachestore.py
+++ b/giscanner/cachestore.py
@@ -45,10 +45,7 @@ def _get_versionhash():
def _get_cachedir():
if 'GI_SCANNER_DISABLE_CACHE' in os.environ:
return None
- if os.name == 'nt' and 'MSYSTEM' not in os.environ:
- homedir = os.environ.get('HOMEPATH')
- else:
- homedir = os.environ.get('HOME')
+ homedir = os.path.expanduser('~')
if homedir is None:
return None
if not os.path.exists(homedir):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]