Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 405899 - net-mail/queue-repair - /usr/bin/queue-repair.py: AttributeError: 'dict_keys' object has no attribute 'sort'
Summary: net-mail/queue-repair - /usr/bin/queue-repair.py: AttributeError: 'dict_keys'...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords: PATCH
: 415929 435334 514096 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-26 14:23 UTC by Oliver Welter
Modified: 2016-05-06 13:40 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes issues mentioned by python upgrade guide (queue-repair.py.patch,4.18 KB, patch)
2012-02-26 14:25 UTC, Oliver Welter
Details | Diff
queue-repair-0.9.0-r1.patch (queue-repair-0.9.0-r1.patch,1.33 KB, patch)
2014-02-12 21:32 UTC, Brian Evans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Welter 2012-02-26 14:23:06 UTC
The net-mail/queue-repair script is not running on python3. 
I fixed the obvious stuff (octal notation, error excepts) so the script compiles, but now I get this error when executing it:

Traceback (most recent call last):
  File "/usr/bin/queue-repair.py", line 778, in <module>
    main()
  File "/usr/bin/queue-repair.py", line 774, in main
    check_queue(qmaildir, test, force_split, force_bigtodo, create, mathishard)
  File "/usr/bin/queue-repair.py", line 686, in check_queue
    check_dirs(dirs, split, bigtodo)
  File "/usr/bin/queue-repair.py", line 334, in check_dirs
    _dirs.sort()
AttributeError: 'dict_keys' object has no attribute 'sort'

I dont have any idea of python, so perhaps anybody can fix this...

Reproducible: Always

Steps to Reproduce:
1. Switch to python3+
2. Fix Octal Notations and except/raise statements (see patch)
3. Execute /usr/bin/queue-repair.py
Actual Results:  
Traceback (most recent call last):
  File "/usr/bin/queue-repair.py", line 778, in <module>
    main()
  File "/usr/bin/queue-repair.py", line 774, in main
    check_queue(qmaildir, test, force_split, force_bigtodo, create, mathishard)
  File "/usr/bin/queue-repair.py", line 686, in check_queue
    check_dirs(dirs, split, bigtodo)
  File "/usr/bin/queue-repair.py", line 334, in check_dirs
    _dirs.sort()
AttributeError: 'dict_keys' object has no attribute 'sort'

Expected Results:  
work =)
Comment 1 Oliver Welter 2012-02-26 14:25:13 UTC
Created attachment 303339 [details, diff]
Fixes issues mentioned by python upgrade guide
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-02-27 01:35:46 UTC
Comment on attachment 303339 [details, diff]
Fixes issues mentioned by python upgrade guide

That's a nice patch for upstream - a nicer (ebuild) patch would simply set the required python version as a runtime dependency, and also set the proper shebang in the script.
Comment 3 Brian Evans (RETIRED) gentoo-dev 2014-02-12 21:32:48 UTC
Created attachment 370248 [details, diff]
queue-repair-0.9.0-r1.patch

Patch to use python-single-r1.eclass
Comment 4 Pacho Ramos gentoo-dev 2016-05-06 08:37:33 UTC
I would say... go ahead and fix this finally :/

Thanks
Comment 5 Pacho Ramos gentoo-dev 2016-05-06 08:37:51 UTC
*** Bug 415929 has been marked as a duplicate of this bug. ***
Comment 6 Pacho Ramos gentoo-dev 2016-05-06 08:45:22 UTC
*** Bug 435334 has been marked as a duplicate of this bug. ***
Comment 7 Pacho Ramos gentoo-dev 2016-05-06 08:48:19 UTC
*** Bug 514096 has been marked as a duplicate of this bug. ***
Comment 8 Brian Evans (RETIRED) gentoo-dev 2016-05-06 13:40:25 UTC
Committed queue-repair-0.9.0-r1