mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #7970 from basepi/gitfs
Don't assume the fileserver cache dir has been created
This commit is contained in:
commit
5c1c0ee250
@ -144,7 +144,10 @@ def init():
|
||||
|
||||
def purge_cache():
|
||||
bp_ = os.path.join(__opts__['cachedir'], 'gitfs')
|
||||
remove_dirs = os.listdir(bp_)
|
||||
try:
|
||||
remove_dirs = os.listdir(bp_)
|
||||
except OSError:
|
||||
remove_dirs = []
|
||||
for _, opt in enumerate(__opts__['gitfs_remotes']):
|
||||
repo_hash = hashlib.md5(opt).hexdigest()
|
||||
try:
|
||||
|
@ -142,7 +142,10 @@ def init():
|
||||
|
||||
def purge_cache():
|
||||
bp_ = os.path.join(__opts__['cachedir'], 'hgfs')
|
||||
remove_dirs = os.listdir(bp_)
|
||||
try:
|
||||
remove_dirs = os.listdir(bp_)
|
||||
except OSError:
|
||||
remove_dirs = []
|
||||
for _, opt in enumerate(__opts__['hgfs_remotes']):
|
||||
repo_hash = hashlib.md5(opt).hexdigest()
|
||||
try:
|
||||
|
@ -74,7 +74,10 @@ def init():
|
||||
|
||||
def purge_cache():
|
||||
bp_ = os.path.join(__opts__['cachedir'], 'svnfs')
|
||||
remove_dirs = os.listdir(bp_)
|
||||
try:
|
||||
remove_dirs = os.listdir(bp_)
|
||||
except OSError:
|
||||
remove_dirs = []
|
||||
for _, opt in enumerate(__opts__['svnfs_remotes']):
|
||||
repo_hash = hashlib.md5(opt).hexdigest()
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user