More useful error logging

Error itself didn't get any "better", though :(
Still can't figure out how to properly RPC "any" unicode string.
Grrr. Kial ni ne ĉiuj parolas Esperanton anstataŭ? :)
This commit is contained in:
The Dod 2014-03-19 07:39:59 +07:00
parent 80f7dfc3ac
commit 1e26d9a161

View File

@ -36,8 +36,8 @@ def main(max_items):
logging.info(u'posting {0}'.format(msg)) logging.info(u'posting {0}'.format(msg))
try: try:
twister.newpostmsg(USERNAME,get_next_k(twister,USERNAME),msg) twister.newpostmsg(USERNAME,get_next_k(twister,USERNAME),msg)
except Exception,e: except Exception,e: # To do: find out why some unicode chars screw this and how to do this "right"
logging.error(e) logging.error(`e`)
n_items+=1 n_items+=1
if __name__=='__main__': if __name__=='__main__':