code errors in import plugins

Bug #909513 reported by Elan Ruusamäe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Griffith
Fix Committed
Medium
Michael

Bug Description

when i surfed over import plugins to write my own for tellico imports (will submit the result separately) i noticed some odd code:

DVDProfiler.py

263 if details['genre'] > 2:
264 details['genre'] = details['genre'][:-2]

...

271 if details['studio'] > 2:
272 details['studio'] = details['studio'][:-2]

i'm somewhat sure there should be enclosed len():

263 if len(details['genre']) > 2:
264 details['genre'] = details['genre'][:-2]

...

271 if len(details['studio']) > 2:
272 details['studio'] = details['studio'][:-2]

as the clause is always true otherwise:
$ python
>>> "" > 2
True
>>> "1234" > 2
True

Revision history for this message
Michael (mikej06) wrote :

Good find.
Fixed it with rev. 1612

Changed in griffith:
assignee: nobody → Michael (mikej06)
importance: Undecided → Medium
status: New → Fix Committed
Michael (mikej06)
Changed in griffith:
milestone: none → 0.13.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.