Skip to content

Commit 6a7d4c5

Browse files
author
Richard Jones
committed
Fix demo.py arguments
Fix postgresql backend braino
1 parent 5e71b29 commit 6a7d4c5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Copyright (c) 2003 Richard Jones ([email protected])
44
#
5-
# $Id: demo.py,v 1.16 2004-07-28 02:29:45 richard Exp $
5+
# $Id: demo.py,v 1.17 2004-10-07 06:04:26 richard Exp $
66

77
import sys, os, string, re, urlparse, ConfigParser
88
import shutil, socket, errno, BaseHTTPServer
@@ -80,9 +80,9 @@ def run_demo():
8080
'''
8181
home = os.path.abspath('demo')
8282
backend = 'anydbm'
83-
if not os.path.exists(home) or sys.argv[-1] == 'nuke':
83+
if not os.path.exists(home) or (len(sys.argv) > 1 and sys.argv[1] == 'nuke'):
8484
if len(sys.argv) > 2:
85-
backend = sys.argv[1]
85+
backend = sys.argv[2]
8686
install_demo(home, backend)
8787

8888
cfg = ConfigParser.ConfigParser()

roundup/backends/back_postgresql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class Database(rdbms_common.Database):
8282
arg = '%s'
8383

8484
def sql_open_connection(self):
85-
db = rdbms_common.connection_dict(config, 'database')
85+
db = rdbms_common.connection_dict(self.config, 'database')
8686
self.config.logging.getLogger('hyperdb').info('open database %r'%(
8787
db['database'],))
8888
try:

0 commit comments

Comments
 (0)