From d74f21258be16d732c4c864db591168eee9481ab Mon Sep 17 00:00:00 2001 From: Greg Hewgill Date: Thu, 27 Aug 2009 19:41:25 +1200 Subject: [PATCH] additional information on fetch exception --- ljdump.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ljdump.py b/ljdump.py index f6820af..a6326ba 100755 --- a/ljdump.py +++ b/ljdump.py @@ -244,8 +244,9 @@ def ljdump(Server, Username, Password, Journal): try: r = urllib2.urlopen(urllib2.Request(Server+"/export_comments.bml?get=comment_meta&startid=%d%s" % (maxid+1, authas), headers = {'Cookie': "ljsession="+ljsession})) meta = xml.dom.minidom.parse(r) - except: + except Exception, x: print "*** Error fetching comment meta, possibly not community maintainer?" + print "***", x break finally: try: @@ -280,8 +281,9 @@ def ljdump(Server, Username, Password, Journal): try: r = urllib2.urlopen(urllib2.Request(Server+"/export_comments.bml?get=comment_body&startid=%d%s" % (maxid+1, authas), headers = {'Cookie': "ljsession="+ljsession})) meta = xml.dom.minidom.parse(r) - except: + except Exception, x: print "*** Error fetching comment body, possibly not community maintainer?" + print "***", x break finally: r.close() -- 2.39.2