diff options
author | Juergen Bocklage-Ryannel <jbocklage-ryannel@luxoft.com> | 2017-08-11 13:32:18 +0200 |
---|---|---|
committer | Juergen Bocklage-Ryannel <jbocklage-ryannel@luxoft.com> | 2017-08-11 13:32:18 +0200 |
commit | 0743272c20c034c2252fcf098a94776cc3300144 (patch) | |
tree | 6e7c5abbfa4fcafc58956d1c541a247e295855b1 | |
parent | 370e6f62437d11a7c6974cd5ed71e6a8f0761ded (diff) | |
download | qtivi-qface-0743272c20c034c2252fcf098a94776cc3300144.tar.gz |
changed calling of watch.monitor.
It takes now the location of the original script, the source
and destinations and and argv list of the calling arguments
-rw-r--r-- | qface/watch.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qface/watch.py b/qface/watch.py index 4667fe3..9501f25 100644 --- a/qface/watch.py +++ b/qface/watch.py @@ -28,15 +28,15 @@ class RunScriptChangeHandler(FileSystemEventHandler): self.is_running = False -def monitor(script, src, dst): +def monitor(script, src, dst, args): """ reloads the script given by argv when src files changes """ src = src if isinstance(src, (list, tuple)) else [src] dst = Path(dst).expand().abspath() src = [Path(entry).expand().abspath() for entry in src] - script = Path(script).expand().abspath() - command = '{0} {1} {2}'.format(script, ' '.join(src), dst) + command = ' '.join(args) + print('command: ', command) event_handler = RunScriptChangeHandler(command) observer = Observer() click.secho('watch recursive: {0}'.format(script.dirname()), fg='blue') |