8000 fsmonitor: apply pylint suggestions · ag-python-qt/git-cola@6696dc6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6696dc6

Browse files
committed
fsmonitor: apply pylint suggestions
Signed-off-by: David Aguilar <davvid@gmail.com>
1 parent 346cb92 commit 6696dc6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cola/fsmonitor.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,21 @@
2525

2626
AVAILABLE = None
2727

28+
pywintypes = None
29+
win32file = None
30+
win32con = None
31+
win32event = None
2832
if utils.is_win32():
2933
try:
3034
import pywintypes
3135
import win32con
3236
import win32event
3337
import win32file
38+
39+
AVAILABLE = 'pywin32'
3440
except ImportError:
3541
pass
36-
else:
37-
AVAILABLE = 'pywin32'
42+
3843
elif utils.is_linux():
3944
try:
4045
from . import inotify
@@ -376,7 +381,7 @@ def __init__(self, path, flags):
376381
self.overlapped = pywintypes.OVERLAPPED()
377382
self.overlapped.hEvent = self.event
378383
self._start()
379-
except Exception:
384+
except Exception: # pylint: disable=broad-exception-caught
380385
self.close()
381386

382387
def append(self, events):

0 commit comments

Comments
 (0)
0