mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #16601 from rallytime/bp-16591
Backport #16591 to 2014.7
This commit is contained in:
commit
e603e18dd4
10
salt/key.py
10
salt/key.py
@ -547,9 +547,13 @@ class Key(object):
|
|||||||
ret = {}
|
ret = {}
|
||||||
for dir_ in acc, pre, rej:
|
for dir_ in acc, pre, rej:
|
||||||
ret[os.path.basename(dir_)] = []
|
ret[os.path.basename(dir_)] = []
|
||||||
for fn_ in salt.utils.isorted(os.listdir(dir_)):
|
try:
|
||||||
if os.path.isfile(os.path.join(dir_, fn_)):
|
for fn_ in salt.utils.isorted(os.listdir(dir_)):
|
||||||
ret[os.path.basename(dir_)].append(fn_)
|
if os.path.isfile(os.path.join(dir_, fn_)):
|
||||||
|
ret[os.path.basename(dir_)].append(fn_)
|
||||||
|
except (OSError, IOError):
|
||||||
|
# key dir kind is not created yet, just skip
|
||||||
|
continue
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def all_keys(self):
|
def all_keys(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user