Mercurial > repos > bernhardlutz > rest_tool
comparison readfile.py @ 8:3c1e862e8cd6 draft
Uploaded
author | bernhardlutz |
---|---|
date | Fri, 02 May 2014 05:40:28 -0400 |
parents | 54358dfa62c0 |
children | 80bf0039c0dc |
comparison
equal
deleted
inserted
replaced
7:35b41070c20d | 8:3c1e862e8cd6 |
---|---|
15 except urllib2.HTTPError, e: | 15 except urllib2.HTTPError, e: |
16 return "" | 16 return "" |
17 else: | 17 else: |
18 return connection.read().rstrip() | 18 return connection.read().rstrip() |
19 | 19 |
20 def store_result(url, outfile): | |
21 data=getresult(url) | |
22 outfile.write(data) | |
23 outfile.close() |