diff options
| author | Pepper <pepper@scannerjammer.com> | 2015-05-11 05:45:57 -0400 |
|---|---|---|
| committer | Pepper <pepper@scannerjammer.com> | 2015-05-11 05:45:57 -0400 |
| commit | a065ca4dd1a4726ed9ea703ba6d12150ee4b8922 (patch) | |
| tree | 038d62e1b8032bebc6498ab52f88fe1b94781270 /pb/lib/utils.py | |
| parent | 7daa48ab2ec9c56340f37d4adce549163765e183 (diff) | |
push
Diffstat (limited to 'pb/lib/utils.py')
| -rw-r--r-- | pb/lib/utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pb/lib/utils.py b/pb/lib/utils.py index 3630ba0..5ca5b3e 100644 --- a/pb/lib/utils.py +++ b/pb/lib/utils.py @@ -4,6 +4,7 @@ import time import urllib import urllib2 import sys +import os from subprocess import Popen,PIPE,call Request = urllib2.Request urlencode = urllib.urlencode @@ -102,10 +103,10 @@ def download(url, destination, max_size=MAX_SIZE): def file_size (filepath): try: - return os.stat(file)[6] + return os.stat(filepath)[6] except Exception as e: - sys.stderr.write("IMGRID couldn't determine file size") - sys.stderr.write(str(e)) + sys.stderr.write("Couldn't determine filesize\n") + sys.stderr.write(str(e)+"\n") raise; def gif_frames(filepath): |
