From 7c6270afa89a33873593e7571089bada260a1abd Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Tue, 16 Aug 2011 22:42:18 +0200 Subject: Remove the scm dir if it exists already --- ebuildgen/scmprojects.py | 6 ++++++ 1 file changed, 6 insertions(+) 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: -- cgit v1.2.3-65-gdbad