From: khamidou Date: Thu, 18 Feb 2010 16:15:30 +0000 (+0100) Subject: polished liszt-setup X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=0ca63c9c963e0991415a26d88769587a355b99af;p=liszt.git polished liszt-setup --- diff --git a/liszt-setup b/liszt-setup index 9fc6046..2eed113 100755 --- a/liszt-setup +++ b/liszt-setup @@ -2,11 +2,20 @@ # This program setups the ~/.liszt directory. import os +import shutil import ConfigParser path = os.path.expanduser('~/.liszt/') if os.access(path, os.F_OK): + # Get rid of the previously created directory. + try: + shutil.rmtre(path) + except OSError: + print "Error : Unable to remove " + path + sys.exit(-1) + + os.mkdir(path) os.chdir(path) else: os.mkdir(path)