diff options
author | tr4ck3ur <tr4ck3ur@style-python.fr> | 2015-02-14 21:44:03 +0100 |
---|---|---|
committer | tr4ck3ur <tr4ck3ur@style-python.fr> | 2015-02-14 21:44:03 +0100 |
commit | e3d6c9839f41796a4870d8e9dea50ed2b657f014 (patch) | |
tree | 208a68fe017bd634f1c2a1478997a1a33aa6791c /jm2l/upload.py | |
parent | a1d2243d1707d6e780b9aca5cbaf00028ee536a8 (diff) | |
download | jm2l-e3d6c9839f41796a4870d8e9dea50ed2b657f014.tar.gz jm2l-e3d6c9839f41796a4870d8e9dea50ed2b657f014.tar.bz2 jm2l-e3d6c9839f41796a4870d8e9dea50ed2b657f014.tar.xz jm2l-e3d6c9839f41796a4870d8e9dea50ed2b657f014.zip |
remove inused print
Diffstat (limited to 'jm2l/upload.py')
-rw-r--r-- | jm2l/upload.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/jm2l/upload.py b/jm2l/upload.py index ed9b3e1..e063dc4 100644 --- a/jm2l/upload.py +++ b/jm2l/upload.py @@ -48,11 +48,9 @@ class MediaPath(): def get_list(self, media_table, linked_id): filelist = list() curpath = self.get_mediapath(media_table, linked_id, None) - print curpath if not os.path.isdir(curpath): return list() for f in os.listdir(curpath): - print curpath if os.path.isdir(os.path.join(curpath,f)): continue if f.endswith('.type'): @@ -69,7 +67,6 @@ class MediaPath(): if not os.path.isdir(curpath): return list() for f in os.listdir(curpath): - print curpath if os.path.isdir(os.path.join(curpath,f)): continue if f.endswith('.type'): @@ -154,9 +151,7 @@ class MediaUpload(MediaPath): result['error'] = 'Ce type fichier n\'est malheureusement pas supporté. ' result['error'] += 'Les fichiers acceptées sont les images et pdf.' return False - print result['size'] if result['size'] < MIN_FILE_SIZE: - raise result['error'] = 'le fichier est trop petit' elif result['size'] > MAX_FILE_SIZE: result['error'] = 'le fichier est trop voluminueux' @@ -254,7 +249,6 @@ class MediaUpload(MediaPath): def fileinfo(self,name): filename = self.mediapath(name) f, ext = os.path.splitext(name) - print "fileinfo ? '%s'" % name, filename if ext!='.type' and os.path.isfile(filename): info = {} info['name'] = name @@ -318,21 +312,18 @@ class MediaUpload(MediaPath): except IOError: pass except OSError: - print self.mediapath(filename) + '.type', 'Not found' pass try: os.remove(self.thumbnailpath(filename)) except IOError: pass - except OSError: - print self.thumbnailpath(filename), 'Not found' + except OSError: pass try: os.remove(self.thumbnailpath(filename+".jpg")) except IOError: pass - except OSError: - print self.thumbnailpath(filename), 'Not found' + except OSError: pass try: os.remove(self.mediapath(filename)) |