mirror of
git://git.yoctoproject.org/yocto-autobuilder-helper.git
synced 2025-10-22 14:52:20 +02:00
janitor/clobberdir: Ensure TRASH_DIR exists
Rather than letting bad things happen, exit with an error message if TRASH_DIR doesn't exist. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
fa3e15fba7
commit
f8fe275c36
|
@ -49,6 +49,10 @@ if "TRASH_DIR" not in ourconfig:
|
|||
|
||||
trashdir = utils.getconfig("TRASH_DIR", ourconfig)
|
||||
|
||||
if not os.path.exists(trashdir):
|
||||
print("Error, TRASH_DIR %s does not exist" % trashdir)
|
||||
sys.exit(1)
|
||||
|
||||
for x in [clobberdir]:
|
||||
if os.path.exists(x) and os.path.exists(trashdir):
|
||||
if (os.stat(trashdir).st_dev == os.stat(x).st_dev):
|
||||
|
|
Loading…
Reference in New Issue
Block a user