From 823704cf36a232633dedffeae8fe02f80d4a6086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8Dcaro=20R=2E=20Scherma?= Date: Wed, 13 Jan 2021 16:44:16 -0800 Subject: [PATCH] Fixes Python 2.7 import issue, not linked to pywin --- .../Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51.pyw | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51.pyw b/Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51.pyw index 7a0dcd8..4c301e6 100644 --- a/Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51.pyw +++ b/Other_Tools/Tetrachroma_FileOpen_ineptpdf/ineptpdf_8.4.51.pyw @@ -2290,10 +2290,13 @@ class PDFDocument(object): import win32api import win32security import win32file - import winreg except: raise ADEPTError('PyWin Extension (Win32API module) needed.\n'+\ 'Download from http://sourceforge.net/projects/pywin32/files/ ') + try: + import winreg + except ImportError: + import _winreg as winreg try: v0 = win32api.GetVolumeInformation('C:\\') v1 = win32api.GetSystemInfo()[6]