summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-25 17:01:41 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-25 17:01:41 -0700
commitb91062834960e17ac053bc47db020df3b5c5102e (patch)
treed58638decd7065b1584f2b2d1cf24ec556ed083b /packages
parente7878007a41fb965886adfa0abc95ebd548b3f80 (diff)
downloadvyos-cloud-init-b91062834960e17ac053bc47db020df3b5c5102e.tar.gz
vyos-cloud-init-b91062834960e17ac053bc47db020df3b5c5102e.zip
Ensure rpmbuild is actually a directory before cleaning
Diffstat (limited to 'packages')
-rwxr-xr-xpackages/brpm3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/brpm b/packages/brpm
index 5feade24..c11b86ff 100755
--- a/packages/brpm
+++ b/packages/brpm
@@ -243,7 +243,8 @@ def generate_spec_contents(tmpl_fn):
def main():
root_dir = os.path.expanduser("~/rpmbuild")
info("Cleaning %s" % (root_dir))
- util.delete_dir_contents(root_dir)
+ if os.path.isdir(root_dir):
+ util.delete_dir_contents(root_dir)
arc_dir = os.path.join(root_dir, 'SOURCES')
util.ensure_dirs([root_dir, arc_dir])
tmpl_fn = os.path.join(os.getcwd(), 'brpm.tmpl')