executor: prevent false positive diskaccountant warning
This change prevents a false warning to appears when the git_dir has a trailing slash. Change-Id: I90d0d34642930d963dc9d3de9171cf9b08cd13e5
This commit is contained in:
parent
9e0c733aac
commit
1150d086a5
|
@ -120,6 +120,9 @@ class DiskAccountant(object):
|
|||
:param callable usage_func: Optional function to call with usage
|
||||
for every dir _NOT_ over limit
|
||||
'''
|
||||
# Remove any trailing slash to ensure dirname equality tests work
|
||||
cache_dir = cache_dir.rstrip('/')
|
||||
jobs_base = jobs_base.rstrip('/')
|
||||
# Don't cross the streams
|
||||
if cache_dir == jobs_base:
|
||||
raise Exception("Cache dir and jobs dir cannot be the same")
|
||||
|
|
Loading…
Reference in New Issue