Permalink
Browse files

solving conflicts

  • Loading branch information...
2 parents 2cc036f + af60b95 commit 8e6f234a7933c7cdcb30e42c648d901306c8bcb2 @luizvital committed May 16, 2011
Showing with 13 additions and 13 deletions.
  1. +6 −6 twitter/cmdline.py
  2. +3 −3 twitter/ircbot.py
  3. +1 −1 twitter/logger.py
  4. +3 −3 twitter/stream.py
View
@@ -395,7 +395,7 @@ def __call__(self, twitter, options):
af = get_formatter('admin', options)
try:
user = self.getUser(twitter, options['extra_args'][0])
- except TwitterError as e:
+ except TwitterError, e:
print "There was a problem following or leaving the specified user."
print "You may be trying to follow a user you are already following;"
print "Leaving a user you are not currently following;"
@@ -495,7 +495,7 @@ def __call__(self, twitter, options):
Full CMD Line help is appended below for your convinience.'''
Action()(twitter, options)
options['action'] = ''
- except NoSuchActionError as e:
+ except NoSuchActionError, e:
print >> sys.stderr, e
except KeyboardInterrupt:
print >> sys.stderr, '\n[Keyboard Interrupt]'
@@ -553,7 +553,7 @@ def main(args=sys.argv[1:]):
arg_options = {}
try:
parse_args(args, arg_options)
- except GetoptError as e:
+ except GetoptError, e:
print >> sys.stderr, "I can't do that, %s." % (e)
print >> sys.stderr
raise SystemExit(1)
@@ -595,10 +595,10 @@ def main(args=sys.argv[1:]):
try:
Action()(twitter, options)
- except NoSuchActionError as e:
+ except NoSuchActionError, e:
print >> sys.stderr, e
raise SystemExit(1)
- except TwitterError as e:
+ except TwitterError, e:
print >> sys.stderr, str(e)
print >> sys.stderr, "Use 'twitter -h' for help."
- raise SystemExit(1)
+ raise SystemExit(1)
View
@@ -165,7 +165,7 @@ def check_statuses(self):
debug("In check_statuses")
try:
updates = reversed(self.twitter.statuses.friends_timeline())
- except Exception as e:
+ except Exception, e:
print >> sys.stderr, "Exception while querying twitter:"
traceback.print_exc(file=sys.stderr)
return
@@ -341,12 +341,12 @@ def main():
if not os.path.exists(configFilename):
raise Exception()
load_config(configFilename)
- except Exception as e:
+ except Exception, e:
print >> sys.stderr, "Error while loading ini file %s" % (
configFilename)
print >> sys.stderr, e
print >> sys.stderr, __doc__
sys.exit(1)
bot = TwitterBot(configFilename)
- return bot.run()
+ return bot.run()
View
@@ -87,7 +87,7 @@ def main(args=sys.argv[1:]):
if tweets_processed == 0:
log_debug("That's it, we got all the tweets. Done.")
break
- except TwitterError as e:
+ except TwitterError, e:
log_debug("Twitter bailed out. I'm going to sleep a bit then try again")
sleep(3)
View
@@ -14,7 +14,7 @@ class TwitterJSONIter(object):
def __init__(self, handle, uri, arg_data):
self.decoder = json.JSONDecoder()
self.handle = handle
- self.buf = b""
+ self.buf = ""
def __iter__(self):
while True:
@@ -24,9 +24,9 @@ def __iter__(self):
res, ptr = self.decoder.raw_decode(utf8_buf)
self.buf = utf8_buf[ptr:].encode('utf8')
yield wrap_response(res, self.handle.headers)
- except ValueError as e:
+ except ValueError, e:
continue
- except urllib_error.HTTPError as e:
+ except urllib_error.HTTPError, e:
raise TwitterHTTPError(e, uri, self.format, arg_data)
class TwitterStreamCall(TwitterCall):

0 comments on commit 8e6f234

Please sign in to comment.