diff options
Diffstat (limited to 'python2/pyinotify.py')
-rwxr-xr-x | python2/pyinotify.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/python2/pyinotify.py b/python2/pyinotify.py index aa9c148..7d6b05f 100755 --- a/python2/pyinotify.py +++ b/python2/pyinotify.py @@ -68,7 +68,6 @@ from datetime import datetime, timedelta import time import re import asyncore -import glob import subprocess try: @@ -77,6 +76,12 @@ except ImportError: pass # Will fail on Python 2.4 which has reduce() builtin anyway. try: + from glob import iglob as glob +except ImportError: + # Python 2.4 does not have glob.iglob(). + from glob import glob as glob + +try: import ctypes import ctypes.util except ImportError: @@ -1830,7 +1835,7 @@ class WatchManager: def __glob(self, path, do_glob): if do_glob: - return glob.iglob(path) + return glob(path) else: return [path] |