git.ucc.asn.au
/
frenchie
/
icalparse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
06d5abd
)
Catching some more exceptions
author
James French
<
[email protected]
>
Mon, 2 Aug 2010 05:12:33 +0000
(13:12 +0800)
committer
James French
<
[email protected]
>
Mon, 2 Aug 2010 05:12:33 +0000
(13:12 +0800)
icalparse.py
patch
|
blob
|
history
diff --git
a/icalparse.py
b/icalparse.py
index
780750b
..
2c7ec4e
100755
(executable)
--- a/
icalparse.py
+++ b/
icalparse.py
@@
-97,7
+97,7
@@
def getContent(url='',stdin=False):
res = urllib2.urlopen(url)
content = res.read()
res.close()
- except (urllib2.URLError,
Value
Error), e:
+ except (urllib2.URLError,
OS
Error), e:
sys.stderr.write('%s\n'%e)
sys.exit(1)
return content
@@
-131,7
+131,7
@@
def getHTTPContent(url='',cache='.httplib2-cache'):
try:
content = urllib2.urlopen(url).read()
return content
- except
urllib2.URLError
, e:
+ except
(urllib2.URLError, OSError)
, e:
sys.stderr.write('%s\n'%e)
sys.exit(1)
UCC
git Repository :: git.ucc.asn.au