Mercurial > p > roundup > code
diff demo.py @ 1645:ccabdc2055cf
handle non-existant demo dir (thanks Ollie Rutherfurd)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sun, 11 May 2003 07:33:55 +0000 |
| parents | d0b29215aa44 |
| children | a4db6067814a |
line wrap: on
line diff
--- a/demo.py Sat May 10 23:13:10 2003 +0000 +++ b/demo.py Sun May 11 07:33:55 2003 +0000 @@ -2,7 +2,7 @@ # # Copyright (c) 2003 Richard Jones (richard@mechanicalcat.net) # -# $Id: demo.py,v 1.1 2003-05-09 05:04:33 richard Exp $ +# $Id: demo.py,v 1.2 2003-05-11 07:33:55 richard Exp $ import sys, os, string, re, urlparse import shutil, socket, errno, BaseHTTPServer @@ -11,7 +11,8 @@ def install_demo(home): # create the instance try: - shutil.rmtree(home) + if os.path.exists(home): + shutil.rmtree(home) except os.error, error: if error.errno != errno.ENOENT: raise
