Browse files

Move build dir removal to function

  • Loading branch information...
1 parent 02c719b commit c8919f32334463e927ca6f6154f6fc63ea770e98 @dregad dregad committed Feb 8, 2014
Showing with 7 additions and 2 deletions.
  1. +7 −2 buildrelease.py
View
9 buildrelease.py
@@ -84,6 +84,11 @@ def generate_checksum(filename):
f.close()
+def remove_build_dir(release_dir):
+ print "Removing build directory..."
+ shutil.rmtree(release_dir)
+
+
def main():
try:
opts, args = getopt.gnu_getopt(sys.argv[1:], options, long_options)
@@ -239,8 +244,8 @@ def main():
# Cleanup
if clean_build:
- print "Removing build directory..."
- shutil.rmtree(release_dir)
+ print
+ remove_build_dir(release_dir)
# Restore previous umask
os.umask(old_umask)

0 comments on commit c8919f3

Please sign in to comment.