Strip .p from cache file names

This commit is contained in:
Joseph Hall 2017-01-20 15:27:09 -07:00
parent 4913c4f90c
commit 534aa3f527

View file

@ -126,13 +126,17 @@ def list_(bank, cachedir):
if not os.path.isdir(base):
return []
try:
return os.listdir(base)
items = os.listdir(base)
except OSError as exc:
raise SaltCacheError(
'There was an error accessing directory "{0}": {1}'.format(
base, exc
)
)
ret = []
for item in items:
ret.append(item.rstrip('.p'))
return ret
getlist = list_