DrTrigon has submitted this change and it was merged.
Change subject: bugfix; Exception: cannot find nearest multiple for a value less than the
unit: -0.0104166666667, 0.125
......................................................................
bugfix; Exception: cannot find nearest multiple for a value less than the unit:
-0.0104166666667, 0.125
Change-Id: Iaf8a9cbe6704e3727a7d3db4020e018b3ff94b43
---
M catimages.py
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
DrTrigon: Verified; Looks good to me, approved
diff --git a/catimages.py b/catimages.py
index e00bda0..a488011 100644
--- a/catimages.py
+++ b/catimages.py
@@ -3024,6 +3024,8 @@
result.update(s.metadata)
except music21.midi.base.MidiException:
pass
+ except Exception:
+ pass
self._properties['Metadata'] = [result]
return
@@ -3038,7 +3040,7 @@
d = self._util_get_DataStreams_MUSIC21()
result = { 'Format': u'%s' % self.file_mime[1].upper(),
- 'Length': d["duration"], # secs
+ 'Length': d["duration"] if d else
u'-', # secs
'Dimensions': self.image_size,
'Filesize': os.path.getsize(self.file_name),
'MIME': u'%s/%s' %
tuple(self.file_mime[:2]), }
@@ -3094,6 +3096,9 @@
except music21.midi.base.MidiException:
pywikibot.warning(u'unknown file type [_detect_Streams]')
return
+ except Exception:
+ pywikibot.warning(u'unknown file type [_detect_Streams]')
+ return
#fs = music21.features.jSymbolic.extractorsById
#for k in fs:
--
To view, visit
https://gerrit.wikimedia.org/r/112313
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf8a9cbe6704e3727a7d3db4020e018b3ff94b43
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: DrTrigon <dr.trigon(a)surfeu.ch>
Gerrit-Reviewer: DrTrigon <dr.trigon(a)surfeu.ch>
Gerrit-Reviewer: jenkins-bot <>