def __init__(self, path):
     Action.__init__(self, path)
     self.observer = Observer()  # watchdog observer that will watch the files
     self.handler = WatchHandler()
     self.handler.on_modified = self._on_modified
     self.handler.on_created = self._on_created
     self.handler.on_moved = self._on_moved
     self.watch_queue = []  # not much slower than deque unless expecting 100+ items
     self.locale_delimiter = None
     self.ignore_ext = []  # file types to ignore as specified by the user
     self.detected_locales = {}  # dict to keep track of detected locales
Beispiel #2
0
 def __init__(self, path=None, timeout=60):
     Action.__init__(self, path, True, timeout)
     self.observers = []  # watchdog observers that will watch the files
     self.handler = WatchHandler()
     self.handler.on_modified = self._on_modified
     self.handler.on_created = self._on_created
     self.handler.on_moved = self._on_moved
     self.watch_queue = []  # not much slower than deque unless expecting 100+ items
     self.locale_delimiter = None
     self.ignore_ext = []  # file types to ignore as specified by the user
     self.detected_locales = {}  # dict to keep track of detected locales
     self.watch_folder = True
     self.timeout = timeout
     self.updated = {}
     self.git_auto = Git_Auto(path)
     self.polled_list = set([])
     self.force_poll = False