[Merge] lp:~brian-murray/ubuntu-archive-tools/typeerror-datetime into lp:ubuntu-archive-tools

Brian Murray brian at ubuntu.com
Mon Aug 26 17:19:36 UTC 2013


Brian Murray has proposed merging lp:~brian-murray/ubuntu-archive-tools/typeerror-datetime into lp:ubuntu-archive-tools.

Requested reviews:
  Ubuntu Package Archive Administrators (ubuntu-archive)

For more details, see:
https://code.launchpad.net/~brian-murray/ubuntu-archive-tools/typeerror-datetime/+merge/182164

Martin told me that sru-report is occasionally crashing with the following traceback:

Traceback (most recent call last):      
  File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 684, in <module> main()
  File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 680, in main print_report(srus, kernel_ppa)
  File "/home/ubuntu-archive/ubuntu-archive-tools/sru-report", line 215, in print_report
key=itemgetter(1)):
TypeError: can't compare offset-naive and offset-aware datetimes

Digging into this it is because history['published'] is initially set to datetime.datetime.now() which has no timezone information and then it is being compared to a publication's date published record which does.  I believe this resolves the issue by updating history['published'] for some item in history that were not getting updated.
-- 
https://code.launchpad.net/~brian-murray/ubuntu-archive-tools/typeerror-datetime/+merge/182164
Your team Ubuntu Package Archive Administrators is requested to review the proposed merge of lp:~brian-murray/ubuntu-archive-tools/typeerror-datetime into lp:ubuntu-archive-tools.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 445 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-archive/attachments/20130826/2eb4eecc/attachment.diff>


More information about the ubuntu-archive mailing list