Remove the -w/--watch switch and watch regardless

This commit is contained in:
Ole André Vadla Ravnås
2016-05-18 23:09:28 +02:00
parent f66ede5ac0
commit 9344d0cd40
+1 -4
View File
@@ -36,12 +36,9 @@ def main():
def _add_options(self, parser):
parser.add_option("-l", "--load", help="load SCRIPT", metavar="SCRIPT",
type='string', action='store', dest="user_script", default=None)
parser.add_option("-w", "--watch", help="watch SCRIPT for changes and automatically reload it",
action='store_true', dest="watch", default=False)
def _initialize(self, parser, options, args):
self._user_script = options.user_script
self._watch = options.watch
def _usage(self):
return "usage: %prog [options] target"
@@ -100,7 +97,7 @@ def main():
self._script = None
def _monitor_script(self):
if not self._watch or self._monitored_file == self._user_script:
if self._monitored_file == self._user_script:
return
self._unmonitor_script()