Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
e1466e02
Commit
e1466e02
authored
Feb 21, 2015
by
RussellTaylor83
Browse files
Update api.py
Made catch statement error message more explicit for _pack_image
parent
24ca4ea4
Changes
1
Hide whitespace changes
Inline
Side-by-side
tweepy/api.py
View file @
e1466e02
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment