We need to match on .p not just strip '.p' otherwise it will remove any p from the string even if we have no dot

This commit is contained in:
Jean Praloran 2017-03-15 09:04:14 +13:00
parent cd73eafec8
commit d7b0c8ae88

View file

@ -135,7 +135,10 @@ def list_(bank, cachedir):
)
ret = []
for item in items:
ret.append(item.rstrip('.p'))
if item.endswith('.p'):
ret.append(item.rstrip(item[-2:]))
else:
ret.append(item)
return ret