Browse Source

fix 2 issues in gallery:

- use empty string when representative is not set
- make all subdirectories
pull/9/merge
Simon 14 years ago
parent
commit
b06c381833
  1. 5
      sigal/gallery.py

5
sigal/gallery.py

@ -68,7 +68,8 @@ class Gallery:
self.paths[relpath].update(get_metadata(path))
if relpath != '.':
alb_thumb = self.paths[relpath]['representative']
alb_thumb = self.paths[relpath].setdefault('representative',
'')
if (not alb_thumb) or \
(not os.path.isfile(os.path.join(path, alb_thumb))):
alb_thumb = self.find_representative(relpath)
@ -189,4 +190,4 @@ def check_or_create_dir(path):
"Create the directory if it does not exist"
if not os.path.isdir(path):
os.mkdir(path)
os.makedirs(path)

Loading…
Cancel
Save