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): """