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@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches