From b38fbdefb42b50e04976228faab289773f32a3f7 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 14 Jul 2012 21:05:11 -0500 Subject: [PATCH] tweak filemon command --- edbob/commands.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/edbob/commands.py b/edbob/commands.py index f9a3701..0974ed1 100644 --- a/edbob/commands.py +++ b/edbob/commands.py @@ -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): """