From e1466e02e456578c6a1ae4d98e7f2429edff830d Mon Sep 17 00:00:00 2001 From: RussellTaylor83 Date: Sat, 21 Feb 2015 09:56:00 +0000 Subject: [PATCH] Update api.py Made catch statement error message more explicit for _pack_image --- tweepy/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweepy/api.py b/tweepy/api.py index 9fdd9bc..4744275 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -1271,8 +1271,8 @@ class API(object): try: if os.path.getsize(filename) > (max_size * 1024): raise TweepError('File is too big, must be less than %skb.' % max_size) - except os.error: - raise TweepError('Unable to access file') + except os.error as e: + raise TweepError('Unable to access file: %s' % e.strerror) # build the mulitpart-formdata body fp = open(filename, 'rb') -- 2.25.1