Crash on missing username
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
trac-launchpad-migrator |
Fix Released
|
High
|
Unassigned |
Bug Description
When converting a Trac dump from assembla.com, the migrator crashes on line 164:
Traceback (most recent call last):
File "D:\Project\
sys.
File "D:\Project\
lp_comment = create_comment(db, comment)
File "D:\Project\
trac_reporter = db.get_
File "D:\Project\
is_email = username.find('@') > -1
AttributeError: 'NoneType' object has no attribute 'find'
The cause is that the username is None (possibly a problem in the Trac export),
but the migrator should not just crash on this.
I "fixed" it by replacing line 164:
is_email = username.find('@') > -1
with this line:
Related branches
- Graham Binns (community): Approve (code)
-
Diff: 266 lines (+81/-41)2 files modifiedREADME (+2/-0)
migrate.py (+79/-41)
Changed in trac-launchpad-migrator: | |
status: | New → Triaged |
importance: | Undecided → High |
status: | Triaged → Fix Released |