Changes between Initial Version and Version 4 of Ticket #5748


Ignore:
Timestamp:
Jan 26, 2016, 1:47:41 PM (8 years ago)
Author:
Ryan J Ollos
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5748

    • Property Owner changed from mikechml to Marc
    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
  • Ticket #5748 – Description

    initial v4  
    11I'm running the current subversion version (r6459) of the 2.2-dev branch of the plugin, over a 0.11.5 trac.  I see the following error when I perform a "search code reviews" and specify a date for "Reviews after date":
    22
     3{{{
    34 Most recent call last:
    45
     
    106107File "build/bdist.linux-i686/egg/codereview/peerReviewSearch.py", line 52, in process_requestFile "build/bdist.linux-i686/egg/codereview/peerReviewSearch.py", line 138, in performSearchFile "/home/arbit/opt/2/x86_64/lib/python2.5/_strptime.py", line 330, in strptime
    107108  (data_string, format))
     109}}}
    108110
    109111It is clear that the culprit is the following line in the peerReviewSearch function:
    110112
     113{{{#!python
    111114t = time.strptime(month + '/' + day + '/' + year[2] + year[3], '%x')
     115}}}
    112116
    113 This does not work in all locale, since "%x" means the following, as described in the manual of the time module:
     117This does not work in all locale, since `"%x"` means the following, as described in the manual of the time module:
    114118
     119{{{
    115120%x: Locale’s appropriate date representation
     121}}}
    116122
    117123Since the date string constructed by the program is always in a particular format, I suggest changing it to:
    118124
     125{{{#!python
    119126t = time.strptime(month + '/' + day + '/' + year[2] + year[3], '%m/%d/%y')
     127}}}