changeset 75:3928af61b4ce

checkclient final fixes
author Frank Koormann <frank@intevation.de>
date Fri, 06 Mar 2015 15:35:40 +0100
parents 22ce0dc2e71c
children 9ad8421dafb4
files checkclient.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/checkclient.py	Fri Mar 06 15:27:12 2015 +0100
+++ b/checkclient.py	Fri Mar 06 15:35:40 2015 +0100
@@ -14,21 +14,18 @@
     parser.add_option("-p", "--port", default="5000")
     (options, args) = parser.parse_args()
 
-    if len(args) < 2:
+    if len(args) < 1:
         parser.print_usage()
         sys.exit(1)
 
     url = "http://%s:%s/check/" % (options.host, options.port)
     infilename = args[0]
-    format = options.format
 
     files = {'file': open(infilename, 'rb')}
 
-    r = requests.post(url, data=data, files=files)
+    r = requests.post(url, files=files)
 
     if r.status_code == 200:
-        with open(outfilename, "wb") as f:
-            f.write(r.content)
         print "OK"
     else:
         print "An error has occured"
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)