1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 00:30:33 +03:00

Stub out use of watchdog module on Linux.

Fix for bug introduced by a94cf4c.
This commit is contained in:
Jonathan Harris 2015-11-30 14:43:16 +00:00
parent 5ec1a388a9
commit 64cbffad1e
2 changed files with 9 additions and 5 deletions

View File

@ -90,12 +90,12 @@ Download and extract the source code of the [latest release](https://github.com/
Mac:
* Requires the Python “requests” module - install this with `easy_install requests` .
* Requires the Python “requests” and “watchdog” modules - install these with `easy_install requests watchdog` .
* Run with `./EDMarketConnector.py` .
Windows:
* Requires Python2.7 and the Python “requests” module.
* Requires Python2.7 and the Python “requests” and “watchdog” modules.
* Run with `EDMarketConnector.py` .
Linux:

View File

@ -8,17 +8,18 @@ from sys import platform
from time import strptime, localtime, mktime, sleep, time
from datetime import datetime
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
if __debug__:
from traceback import print_exc
if platform=='darwin':
from AppKit import NSWorkspace
from Foundation import NSSearchPathForDirectoriesInDomains, NSApplicationSupportDirectory, NSUserDomainMask
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
elif platform=='win32':
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import ctypes
CSIDL_LOCAL_APPDATA = 0x001C
@ -63,6 +64,9 @@ elif platform=='win32':
return False # stop enumeration
return True
else:
FileSystemEventHandler = object # dummy
class EDLogs(FileSystemEventHandler):