[PATCH] Add a length check to the timestamp version detection. (#1194494)

David Shea dshea at redhat.com
Fri Feb 20 15:13:03 UTC 2015


On 02/20/2015 10:06 AM, Anne Mulhern wrote:
>
>
>
> ----- Original Message -----
>> From: "David Shea" <dshea at redhat.com>
>> To: anaconda-patches at lists.fedorahosted.org
>> Sent: Friday, February 20, 2015 9:09:31 AM
>> Subject: [PATCH] Add a length check to the timestamp version detection.	(#1194494)
>>
>> '22' is not a timestamp.
>> ---
>>   pyanaconda/packaging/__init__.py | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/pyanaconda/packaging/__init__.py
>> b/pyanaconda/packaging/__init__.py
>> index e4a9a63..2af5a9a 100644
>> --- a/pyanaconda/packaging/__init__.py
>> +++ b/pyanaconda/packaging/__init__.py
>> @@ -397,7 +397,7 @@ class Payload(object):
>>   
>>           # If the version looks like a timestamp, assume it's rawhide
>>           # plz change before Fedora version 9999999
>> -        if version[:8].isdigit():
>> +        if len(version) > 7 and version[:8].isdigit():
>>               version = "rawhide"
>>   
>>           log.debug("got a release version of %s", version)
>> --
>> 2.1.0
>>
>> _______________________________________________
>> anaconda-patches mailing list
>> anaconda-patches at lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>>
> It's probably more correct to use a regular expression, at this point.

Before I go down that road (and really? you've seen my regexes, right?) 
I'll repeat a question I asked in the bug: does anyone use this anymore? 
The timestamp check was never very good, and the rawhide .buildstamp 
version these days is "rawhide".



More information about the anaconda-patches mailing list