diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2011-08-16 22:42:18 +0200 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2011-08-16 22:42:18 +0200 |
commit | 7c6270afa89a33873593e7571089bada260a1abd (patch) | |
tree | fdb7a3411991d2a524d2f2209ec2aee78fcba934 | |
parent | Added the ebuild to the git repo (diff) | |
download | ebuildgen-7c6270afa89a33873593e7571089bada260a1abd.tar.gz ebuildgen-7c6270afa89a33873593e7571089bada260a1abd.tar.bz2 ebuildgen-7c6270afa89a33873593e7571089bada260a1abd.zip |
Remove the scm dir if it exists already
-rw-r--r-- | ebuildgen/scmprojects.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ebuildgen/scmprojects.py b/ebuildgen/scmprojects.py index 7310c0b..ae1ecfb 100644 --- a/ebuildgen/scmprojects.py +++ b/ebuildgen/scmprojects.py @@ -1,5 +1,7 @@ from subprocess import call import sys +import glob +import shutil cmdlineget = { "svn" : "svn checkout ", @@ -15,6 +17,10 @@ def getsourcecode(adress,repotype): """ callstr = cmdlineget[repotype] + if glob.glob("/tmp/ebuildgen/curproj"): + #this is might not be the best solution + shutil.rmtree("/tmp/ebuildgen/curproj") + try: retcode = call(callstr + adress + " /tmp/ebuildgen/curproj",shell=True) if retcode < 0: |