Skip to content
Snippets Groups Projects
Commit 5e6766a3 authored by nkour's avatar nkour
Browse files

do not fail if user does not have pywin32

parent 3d5c3e59
No related branches found
No related tags found
No related merge requests found
......@@ -25,10 +25,15 @@ import pango
import os
import sys
HAS_PYWIN32 = True
if os.name == 'nt':
import win32file
import win32con
import pywintypes
try:
import win32file
import win32con
import pywintypes
except ImportError:
HAS_PYWIN32 = False
from common import i18n
i18n.init()
......@@ -356,6 +361,9 @@ def file_is_locked(path_to_file):
if os.name != 'nt': # just in case
return
if not HAS_PYWIN32:
return
secur_att = pywintypes.SECURITY_ATTRIBUTES()
secur_att.Initialize()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment