mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Strip .p from cache file names
This commit is contained in:
parent
4913c4f90c
commit
534aa3f527
1 changed files with 5 additions and 1 deletions
6
salt/cache/localfs.py
vendored
6
salt/cache/localfs.py
vendored
|
@ -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_
|
||||
|
|
Loading…
Add table
Reference in a new issue