Merge pull request #1904 from radarhere/args

Scripts with an incorrect number of arguments
This commit is contained in:
Hugo 2016-05-21 12:55:44 +03:00
commit 55c20731d1
3 changed files with 10 additions and 2 deletions

View File

@ -45,6 +45,10 @@ class Enhance(Frame):
# #
# main # main
if len(sys.argv) != 2:
print("Usage: enhancer file")
sys.exit(1)
root = Tk() root = Tk()
im = Image.open(sys.argv[1]) im = Image.open(sys.argv[1])

View File

@ -66,12 +66,12 @@ class PaintCanvas(Canvas):
# #
# main # main
root = Tk()
if len(sys.argv) != 2: if len(sys.argv) != 2:
print("Usage: painter file") print("Usage: painter file")
sys.exit(1) sys.exit(1)
root = Tk()
im = Image.open(sys.argv[1]) im = Image.open(sys.argv[1])
if im.mode != "RGB": if im.mode != "RGB":

View File

@ -60,6 +60,10 @@ class UI(Frame):
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# main # main
if len(sys.argv) != 2:
print("Usage: thresholder file")
sys.exit(1)
root = Tk() root = Tk()
im = Image.open(sys.argv[1]) im = Image.open(sys.argv[1])