[PATCH 1/2] Add a check that files with translatable strings are in POTFILES.in

David Shea dshea at redhat.com
Fri Dec 6 15:15:24 UTC 2013


On 12/06/2013 09:34 AM, Chris Lumens wrote:
>> +    for checkfile in potcheckfiles:
>> +        if checkfile not in checklist:
>> +            sys.stderr.write("%s not in POTFILES.in\n" % checkfile)
>> +            success = False
>> +
> If you ever expected these lists to be large, set operations would
> likely be faster.  But I don't particularly care.

Ah jeez. The whole reason I did it in python instead of shell was to 
speed up that part, so at least I got halfway there. How about I convert 
POTFILES to a set when I pass it to os.path.walk, and instead of the 
block above I do something like:


     difference = set(potcheckfiles) - checklist
     for missing in difference:
         sys.stderr.write("%s not in POTFILES.in\n" % missing)
         success = False


>
> ACK to these two.
>
> - Chris
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches



More information about the anaconda-patches mailing list