Skip to content

Commit ffe1bdc

Browse files
author
Richard Jones
committed
duh
1 parent a12e0a1 commit ffe1bdc

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

demo.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#
33
# Copyright (c) 2003 Richard Jones ([email protected])
44
#
5-
# $Id: demo.py,v 1.13 2004-07-27 01:59:27 richard Exp $
5+
# $Id: demo.py,v 1.14 2004-07-27 02:34:14 richard Exp $
66

7-
import sys, os, string, re, urlparse
7+
import sys, os, string, re, urlparse, ConfigParser
88
import shutil, socket, errno, BaseHTTPServer
99
from glob import glob
1010

@@ -84,10 +84,9 @@ def run_demo():
8484
backend = sys.argv[1]
8585
install_demo(home, backend)
8686

87-
f = open(os.path.join(home, 'config.ini'), 'r')
88-
url = re.search(r'^web\s*=\s*(http.+/)$', f.read(),
89-
re.M|re.I).group(1)
90-
f.close()
87+
cfg = ConfigParser.ConfigParser()
88+
cfg.read(os.path.join(home, 'config.ini'))
89+
url = cfg.get('tracker', 'web')
9190
hostname, port = urlparse.urlparse(url)[1].split(':')
9291
port = int(port)
9392

0 commit comments

Comments
 (0)