blog2tweet
changeset 2:fb085ac43f08
asciify console output; print whole exception
| author | Peter van Dijk <peter@openpanel.com> |
|---|---|
| date | Sat Jun 12 09:48:44 2010 +0200 (23 months ago) |
| parents | b67dd8b0a537 |
| children | c6f057ed65af |
| files | run.py |
line diff
1.1 --- a/run.py Thu Jun 10 22:53:16 2010 +0200 1.2 +++ b/run.py Sat Jun 12 09:48:44 2010 +0200 1.3 @@ -37,7 +37,7 @@ 1.4 title = title + entry.title[0:t-len(title)] + " " 1.5 title = title + entry.id 1.6 api = twitter.Api(username=user, password=password) 1.7 - print "posting [%s]" % title 1.8 + print "posting [%s]" % title.encode("ascii","replace") 1.9 api.PostUpdate(title) 1.10 1.11 config = json.load(file('config.json')) 1.12 @@ -50,7 +50,7 @@ 1.13 except: 1.14 print "post %s failed" % e.id 1.15 exc_type, exc_value, exc_traceback = sys.exc_info() 1.16 - traceback.print_exc(1) 1.17 + traceback.print_exc() 1.18 continue 1.19 seen[e.id]=1 1.20
