tweak filemon command

This commit is contained in:
Lance Edgar 2012-07-14 21:05:11 -05:00
parent 79c4bfa289
commit b38fbdefb4

View file

@ -427,7 +427,7 @@ class FileMonitorCommand(Subcommand):
help="Uninstall (unregister) service")
uninstall.set_defaults(subcommand='remove')
def run(self, args):
def manage_service(self, args, win32):
if sys.platform == 'linux2':
if args.subcommand == 'start':
from edbob.filemon.linux import start_daemon
@ -437,12 +437,15 @@ class FileMonitorCommand(Subcommand):
stop_daemon()
elif sys.platform == 'win32':
from edbob.filemon.win32 import exec_server_command
exec_server_command(args.subcommand)
win32.exec_server_command(args.subcommand)
else:
print "Sorry, file monitor is not supported on platform %s." % sys.platform
def run(self, args):
from edbob.filemon import win32
self.manage_service(args, win32)
class ShellCommand(Subcommand):
"""