Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
handle empty galleries
  • Loading branch information
ralsina committed Oct 31, 2015
1 parent 8ef82c2 commit 2a09ede
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nikola/plugins/task/galleries.py
Expand Up @@ -558,7 +558,10 @@ def url_from_path(p):
else: # Sort by name
all_data.sort(key=lambda a: a[0])

img_list, thumbs, img_titles = zip(*all_data)
if all_data:
img_list, thumbs, img_titles = zip(*all_data)
else:
img_list, thumbs, img_titles = [], [], []

photo_array = []
for img, thumb, title in zip(img_list, thumbs, img_titles):
Expand Down

0 comments on commit 2a09ede

Please sign in to comment.