mirror of
https://github.com/apprenticeharper/DeDRM_tools
synced 2024-12-27 09:58:59 +01:00
Merge pull request #1481 from icaroscherma/patch-1
[Tetrachroma FileOpen] Fixes Python 2.7 import issue, not linked to pywin
This commit is contained in:
commit
6f198b247c
1 changed files with 4 additions and 1 deletions
|
@ -2290,10 +2290,13 @@ class PDFDocument(object):
|
||||||
import win32api
|
import win32api
|
||||||
import win32security
|
import win32security
|
||||||
import win32file
|
import win32file
|
||||||
import winreg
|
|
||||||
except:
|
except:
|
||||||
raise ADEPTError('PyWin Extension (Win32API module) needed.\n'+\
|
raise ADEPTError('PyWin Extension (Win32API module) needed.\n'+\
|
||||||
'Download from http://sourceforge.net/projects/pywin32/files/ ')
|
'Download from http://sourceforge.net/projects/pywin32/files/ ')
|
||||||
|
try:
|
||||||
|
import winreg
|
||||||
|
except ImportError:
|
||||||
|
import _winreg as winreg
|
||||||
try:
|
try:
|
||||||
v0 = win32api.GetVolumeInformation('C:\\')
|
v0 = win32api.GetVolumeInformation('C:\\')
|
||||||
v1 = win32api.GetSystemInfo()[6]
|
v1 = win32api.GetSystemInfo()[6]
|
||||||
|
|
Loading…
Reference in a new issue