chiark
/
gitweb
/
~ianmdlvl
/
cura.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
121103d
)
Workaround for bug if APPDATA is not set in environment settings.
author
daid
<daid303@gmail.com>
Wed, 12 Mar 2014 11:55:20 +0000
(12:55 +0100)
committer
daid
<daid303@gmail.com>
Wed, 12 Mar 2014 11:55:20 +0000
(12:55 +0100)
Cura/util/pymclevel/mclevelbase.py
patch
|
blob
|
history
diff --git
a/Cura/util/pymclevel/mclevelbase.py
b/Cura/util/pymclevel/mclevelbase.py
index 1e88acdb9d6a47c70406302d57c24a2a6183c566..7bdd9aa228b8c93b47a20a48458bcc54d1792761 100644
(file)
--- a/
Cura/util/pymclevel/mclevelbase.py
+++ b/
Cura/util/pymclevel/mclevelbase.py
@@
-59,7
+59,10
@@
def win32_appdata():
)
except Exception, e:
#print "Error while getting AppData folder using SHGetSpecialFolderLocation: {0!r}".format(e)
- return os.environ['APPDATA'].decode(sys.getfilesystemencoding())
+ try:
+ return os.environ['APPDATA'].decode(sys.getfilesystemencoding())
+ except KeyError:
+ return 'C:/'
if sys.platform == "win32":
appDataDir = win32_appdata()