From 9e01d3948c5d91b6e921d0f412122536a30d3cdd Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 21 Nov 2009 02:08:53 -0500 Subject: Removed an explicit path reference --- python/server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/server.py b/python/server.py index 9aa9c518..8ce99912 100644 --- a/python/server.py +++ b/python/server.py @@ -108,7 +108,7 @@ templateDef = '''#encoding utf-8 class LedgerHandler(BaseHTTPRequestHandler): def __init__(self, *args): - self.journal = ledger.Journal('/Users/johnw/src/ledger/doc/sample.dat') + self.journal = ledger.Journal(sys.argv[1]) BaseHTTPRequestHandler.__init__(self, *args) def do_GET(self): @@ -191,6 +191,8 @@ def main(*args): print "Shutting down server" server.socket.close() -print __name__ if __name__ == '__main__': + if len(sys.argv) < 2: + print "usage: server.py " + sys.exit(1) main() -- cgit v1.2.3