fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a9d6b8f
)
fix refresh covers (facepalm)
author
Jan Szejko
<janek37@gmail.com>
Thu, 27 Apr 2017 14:07:53 +0000
(16:07 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Thu, 27 Apr 2017 14:07:53 +0000
(16:07 +0200)
apps/cover/management/commands/refresh_covers.py
patch
|
blob
|
history
diff --git
a/apps/cover/management/commands/refresh_covers.py
b/apps/cover/management/commands/refresh_covers.py
index
81ff9b8
..
540304d
100644
(file)
--- a/
apps/cover/management/commands/refresh_covers.py
+++ b/
apps/cover/management/commands/refresh_covers.py
@@
-25,6
+25,7
@@
class Command(BaseCommand):
if image.source_url and 'flickr.com' in image.source_url:
try:
flickr_data = get_flickr_data(image.source_url)
+ print flickr_data
except FlickrError as e:
print 'Flickr analysis failed: %s' % e
else:
@@
-35,7
+36,7
@@
class Command(BaseCommand):
print 'Download url already present in image %s' % same_url.get().id
continue
try:
- t = URLOpener().open(
image.download_url
).read()
+ t = URLOpener().open(
flickr_data['download_url']
).read()
except urllib.URLError:
print 'Broken download url'
except IOError: