Changeset 3dc907be1df0…
Parent b198faa623b4…
by
Changes to one file · Browse files at 3dc907be1df0 Showing diff from parent b198faa623b4 Diff from another changeset...
@@ -103,9 +103,12 @@ if os.name == 'nt':
try:
import pywintypes
- from win32com.shell import shell, shellcon
- appdir = shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_APPDATA)
- except (ImportError, pywintypes.com_error):
+ try:
+ from win32com.shell import shell, shellcon
+ appdir = shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_APPDATA)
+ except pywintypes.com_error:
+ appdir = os.environ['APPDATA']
+ except ImportError:
appdir = os.environ['APPDATA']
return os.path.join(appdir, 'TortoiseHg', appname)
else:
|
Loading...