summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-21 04:06:34 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-21 04:06:34 +0200
commit8b7f864ffae2bc57068d230f16a8d568e6963300 (patch)
tree45f11bbdff79e754305155e87704efee9a51b1be
parent18d8a48cc60b86972d1637ff0535a702eb7d90fd (diff)
un rato
-rw-r--r--live-mogrify.py2
-rw-r--r--options/dataset_options.py6
2 files changed, 8 insertions, 0 deletions
diff --git a/live-mogrify.py b/live-mogrify.py
index 97e7aeb..f218f37 100644
--- a/live-mogrify.py
+++ b/live-mogrify.py
@@ -222,6 +222,8 @@ def process_live_input(opt, data_opt, rpc_client):
cv2.imwrite(tmp_path, next_img)
os.rename(tmp_path, next_path)
+ if data_opt.exit:
+ sys.exit(0)
if __name__ == '__main__':
listener = Listener()
diff --git a/options/dataset_options.py b/options/dataset_options.py
index 543d776..c6530d0 100644
--- a/options/dataset_options.py
+++ b/options/dataset_options.py
@@ -93,6 +93,12 @@ class DatasetOptions(BaseOptions):
help='after generating a B image, save it to disk'
)
+ self.parser.add_argument(
+ '--exit',
+ action='store_true',
+ help='exit immediately if set to true (used to interrupt)'
+ )
+
## IMAGE FILTERS
### RECURSION