Permalink
Browse files

cleanup

  • Loading branch information...
1 parent bcbef8c commit 746149dff597075a3f5ae16e62f5c47488f4c0c7 @nerdfiles committed Apr 9, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 kippthon/main.py
View
@@ -52,8 +52,13 @@ def search(limit='5', q=''):
else:
print '\n'
except URLError, e:
- print '%s (%s)' % (e.msg, e.code,)
- print e.url
+ print 'URL: %s' % e.url
+ if hasattr(e, 'reason'):
+ print 'ERROR: Could not reach server.'
+ print e.reason
+ elif hasattr(e, 'code'):
+ print 'ERROR: Could not fulfill request.'
+ print 'DETAILS: %s (%s)' % (e.msg, e.code,)
# == LIST ======================================= #
#

0 comments on commit 746149d

Please sign in to comment.