Commits

Brian Curtin  committed 1e746e3

Change from an OrderedDict to traditional dict for 2.6 compatibility.
Additional string formatting fixes for 2.6 compability.

Thanks to Jo Jurgens.

  • Participants
  • Parent commits ab21259

Comments (0)

Files changed (1)

File FileSystemWatcher.py

 except ImportError:
     from Queue import Queue
 
-from collections import OrderedDict
 import os
 import threading
 import re
 from watcher import _watcher
 
 
-class _HandlerDict(OrderedDict):
-    """An ordered dictionary that functions like FileSystemWatcher `event`
+class _HandlerDict(dict):
+    """An dictionary that functions like FileSystemWatcher `event`
        objects, e.g., FileSystemWatcher.Changed. They support += and -=
        operators to allow you attach and detach callbacks for the given
        events. This will store callable objects with their keys and values
         if os.path.exists(directory) and os.path.isdir(directory):
             self._directory = directory
         else:
-            raise ValueError("{} must be a directory".format(directory))
+            raise ValueError("%s must be a directory" % directory)
 
         self._filter = filter
         self._watcher = _watcher.Watcher(self._directory, self._callback)
     @Filter.setter
     def Filter(self, value):
         if not os.path.isdir(value):
-            raise ValueError("{} must be a directory".format(value))
+            raise ValueError("%s must be a directory" % value)
         self._filter = value
 
     @property