##// END OF EJS Templates
Strange wondows regression
Matthias Bussonnier -
Show More
@@ -198,11 +198,12 b' def get_home_dir(require_writable=False) -> str:'
198 # expanduser failed, use the registry to get the 'My Documents' folder.
198 # expanduser failed, use the registry to get the 'My Documents' folder.
199 try:
199 try:
200 import winreg as wreg
200 import winreg as wreg
201 with wreg.OpenKey(
201 key = wreg.OpenKey(
202 wreg.HKEY_CURRENT_USER,
202 wreg.HKEY_CURRENT_USER,
203 r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
203 r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
204 ) as key:
204 )
205 homedir = wreg.QueryValueEx(key,'Personal')[0]
205 homedir = wreg.QueryValueEx(key,'Personal')[0]
206 key.Close()
206 except:
207 except:
207 pass
208 pass
208
209
General Comments 0
You need to be logged in to leave comments. Login now