From: Oleg Broytman Date: Thu, 12 Aug 2010 19:45:02 +0000 (+0000) Subject: Nicer logging. X-Git-Tag: v4.5.3~104 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=a62cd94997a22857d27764042a120f21a226e94b;p=bookmarks_db.git Nicer logging. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@272 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Robots/bkmk_rsimple.py b/Robots/bkmk_rsimple.py index 67d1fbe..e01c7fe 100644 --- a/Robots/bkmk_rsimple.py +++ b/Robots/bkmk_rsimple.py @@ -251,18 +251,18 @@ class robot_simple(Robot): except IOError, msg: if (msg[0] == "http error") and (msg[1] == -1): bookmark.no_error = "The server did not return any header - it is not an error, actually" - self.log(bookmark.no_error) + self.log(' no headers: %s' % bookmark.no_error) else: bookmark.error = get_error(msg) - self.log(bookmark.error) + self.log(' Error: %s' % bookmark.error) except EOFError: bookmark.error = "Unexpected EOF (FTP server closed connection)" - self.log(bookmark.error) + self.log(' EOF: %s' % bookmark.error) except RedirectException, msg: bookmark.moved = str(msg) - self.log(bookmark.moved) + self.log(' Moved: %s' % bookmark.moved) except KeyboardInterrupt: self.log("Keyboard interrupt (^C)") @@ -272,7 +272,7 @@ class robot_simple(Robot): import traceback traceback.print_exc() bookmark.error = "Exception!" - self.log(bookmark.error) + self.log(' Exception: %s' % bookmark.error) finally: self.finish_check_url(bookmark)