Commit fdf13318 authored by Joshua Roesslein's avatar Joshua Roesslein
Browse files

Merge pull request #547 from skoczen/master

Fixes error message on file too big to reflect actual file size limit.
parents c419c546 3b4bbabe
...@@ -1270,7 +1270,7 @@ class API(object): ...@@ -1270,7 +1270,7 @@ class API(object):
if f is None: if f is None:
try: try:
if os.path.getsize(filename) > (max_size * 1024): if os.path.getsize(filename) > (max_size * 1024):
raise TweepError('File is too big, must be less than 700kb.') raise TweepError('File is too big, must be less than %skb.' % max_size)
except os.error: except os.error:
raise TweepError('Unable to access file') raise TweepError('Unable to access file')
...@@ -1279,7 +1279,7 @@ class API(object): ...@@ -1279,7 +1279,7 @@ class API(object):
else: else:
f.seek(0, 2) # Seek to end of file f.seek(0, 2) # Seek to end of file
if f.tell() > (max_size * 1024): if f.tell() > (max_size * 1024):
raise TweepError('File is too big, must be less than 700kb.') raise TweepError('File is too big, must be less than %skb.' % max_size)
f.seek(0) # Reset to beginning of file f.seek(0) # Reset to beginning of file
fp = f fp = f
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment