From: Alejandro Gómez Date: Thu, 5 Jul 2012 19:23:21 +0000 (+0200) Subject: Explicit imports and removal of unused variables X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7dbb6c46fb052ed7c40ceb48311b83c8ed7a91f3;p=tweepy.git Explicit imports and removal of unused variables --- diff --git a/tests.py b/tests.py index 3905c6b..0c93fd6 100644 --- a/tests.py +++ b/tests.py @@ -3,7 +3,8 @@ import random from time import sleep import os -from tweepy import * +from tweepy import (API, BasicAuthHandler, OAuthHandler, Friendship, Cursor, + MemoryCache, FileCache) """Configurations""" # Must supply twitter account credentials for tests @@ -55,7 +56,7 @@ class TweepyAPITests(unittest.TestCase): self.api.retweets(123) def testgetstatus(self): - s = self.api.get_status(id=123) + self.api.get_status(id=123) def testupdateanddestroystatus(self): # test update @@ -388,4 +389,3 @@ class TweepyCacheTests(unittest.TestCase): if __name__ == '__main__': unittest.main() - diff --git a/tweepy/api.py b/tweepy/api.py index c6bd5d0..ca834d1 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -7,7 +7,7 @@ import mimetypes from tweepy.binder import bind_api from tweepy.error import TweepError -from tweepy.parsers import ModelParser, RawParser +from tweepy.parsers import ModelParser from tweepy.utils import list_to_csv @@ -727,7 +727,7 @@ class API(object): try: if os.path.getsize(filename) > (max_size * 1024): raise TweepError('File is too big, must be less than 700kb.') - except os.error, e: + except os.error: raise TweepError('Unable to access file') # image must be gif, jpeg, or png