From 95c818b64367489b31c19b9ab010242c9dfaea0c Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 11 May 2016 00:35:37 +1000 Subject: [PATCH] Added missing usage text and exit on Scripts --- Scripts/enhancer.py | 4 ++++ Scripts/thresholder.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Scripts/enhancer.py b/Scripts/enhancer.py index 6393c983f..003c4401f 100644 --- a/Scripts/enhancer.py +++ b/Scripts/enhancer.py @@ -45,6 +45,10 @@ class Enhance(Frame): # # main +if len(sys.argv) != 2: + print("Usage: enhancer file") + sys.exit(1) + root = Tk() im = Image.open(sys.argv[1]) diff --git a/Scripts/thresholder.py b/Scripts/thresholder.py index bfeebfa9f..87eaf2e1d 100644 --- a/Scripts/thresholder.py +++ b/Scripts/thresholder.py @@ -60,6 +60,10 @@ class UI(Frame): # -------------------------------------------------------------------- # main +if len(sys.argv) != 2: + print("Usage: thresholder file") + sys.exit(1) + root = Tk() im = Image.open(sys.argv[1])