index 299133a21fdf9cedcfe394036f65773f65e55e8f..b047e843418c9d099117b49bdae17a08ed48e4fd 100644 (file)
--- a/demo.py
+++ b/demo.py
#
# 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.5 2003-07-28 23:17:50 richard Exp $
import sys, os, string, re, urlparse
import shutil, socket, errno, BaseHTTPServer
def install_demo(home):
# create the instance
- try:
+ if os.path.exists(home):
shutil.rmtree(home)
- except os.error, error:
- if error.errno != errno.ENOENT:
- raise
from roundup import init, instance, password
init.install(home, os.path.join('templates', 'classic'))
# don't have email flying around
os.remove(os.path.join(home, 'detectors', 'nosyreaction.py'))
+ try:
+ os.remove(os.path.join(home, 'detectors', 'nosyreaction.pyc'))
+ except os.error, error:
+ if error.errno != errno.ENOENT:
+ raise
init.write_select_db(home, 'anydbm')
# figure basic params for server