Merge pull request #7970 from basepi/gitfs

Don't assume the fileserver cache dir has been created
This commit is contained in:
Thomas S Hatch 2013-10-18 14:58:39 -07:00
commit 5c1c0ee250
3 changed files with 12 additions and 3 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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: