Package: lazygal
Version: 0.8.7-1
Severity: normal
Dear Maintainer,
I encountered a python error when trying to generate a galery with images that
does not contain exif information:
Traceback (most recent call last):
File "/usr/bin/lazygal", line 278, in <module>
album.generate(progress=progress)
File "/usr/lib/python2.7/dist-packages/lazygal/generators.py", line 921, in
generate
destgal.make()
File "/usr/lib/python2.7/dist-packages/lazygal/generators.py", line 663, in
make
super(WebalbumDir, self).make(force or needed_build)
File "/usr/lib/python2.7/dist-packages/lazygal/make.py", line 105, in make
d.make() # dependency building not forced
File "/usr/lib/python2.7/dist-packages/lazygal/make.py", line 105, in make
d.make() # dependency building not forced
File "/usr/lib/python2.7/dist-packages/lazygal/make.py", line 106, in make
self.call_build()
File "/usr/lib/python2.7/dist-packages/lazygal/make.py", line 115, in
call_build
self.build()
File "/usr/lib/python2.7/dist-packages/lazygal/generators.py", line 82, in
build
reverse=self.webgal_dir.subgal_sort_by[1])
File "/usr/lib/python2.7/dist-packages/lazygal/generators.py", line 72, in
<lambda>
subgal_sortkey = lambda x: x.source_dir.latest_media_stamp()
File "/usr/lib/python2.7/dist-packages/lazygal/sourcetree.py", line 377, in
latest_media_stamp
media_stamp = time.mktime(m.get_mtime().timetuple())
AttributeError: 'float' object has no attribute 'timetuple'
It can be easily reproduce with some icons installed. For example with icons
coming from xterm, vim-common, mame, emacs24-common packages.
The command that fails:
$ lazygal --check-all-dirs --subgal-sort-by=exif --clean-destination -o
/tmp/out /usr/share/icons/hicolor/48x48/
A patch that addresses this issue is attached.
Thanks
-- System Information:
Debian Release: 8.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages lazygal depends on:
ii gir1.2-gexiv2-0.10 0.10.2-2
ii python 2.7.9-1
ii python-genshi 0.7-3
ii python-gi 3.14.0-1
ii python-imaging 2.6.1-2
lazygal recommends no packages.
Versions of packages lazygal suggests:
pn gstreamer0.10-plugins-base <none>
pn python-gst0.10 <none>
-- no debconf information
Index: lazygal-0.8.7/lazygal/sourcetree.py
===================================================================
--- lazygal-0.8.7.orig/lazygal/sourcetree.py
+++ lazygal-0.8.7/lazygal/sourcetree.py
@@ -374,7 +374,7 @@ class Directory(File):
if media_stamp_max is None:
# none of the media had a reliable date, use mtime instead
for m in all_medias:
- media_stamp = time.mktime(m.get_mtime().timetuple())
+ media_stamp = m.get_datetime().timestamp
if media_stamp_max is None or media_stamp > media_stamp_max:
media_stamp_max = media_stamp