Delete IR workspace before importing new one
Change-Id: Ib6c7c16bf3656dcfbdde3221fce1c07c5c05b502
This commit is contained in:
parent
51f9a3a279
commit
151bfae959
@ -69,12 +69,12 @@ def ensure_workspace(filename=None):
|
|||||||
workspace = common.name_from_path(filename)
|
workspace = common.name_from_path(filename)
|
||||||
if os.path.isfile(filename):
|
if os.path.isfile(filename):
|
||||||
try:
|
try:
|
||||||
common.execute('ir workspace import "{}"', filename)
|
common.execute('ir workspace delete "{}"', workspace)
|
||||||
except subprocess.CalledProcessError as ex:
|
except subprocess.CalledProcessError as ex:
|
||||||
LOG.debug("workspace file '%s' not imported: %s", filename, ex)
|
LOG.debug("workspace '%s' not deleted: %s", workspace, ex)
|
||||||
else:
|
common.execute('ir workspace import "{}"', filename)
|
||||||
LOG.info("workspace imported from file '%s'", filename)
|
LOG.info("workspace imported from file '%s'", filename)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
LOG.debug("workspace file not found: '%s'", filename)
|
LOG.debug("workspace file not found: '%s'", filename)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user