diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-21 02:08:53 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-21 02:08:53 -0500 |
commit | 9e01d3948c5d91b6e921d0f412122536a30d3cdd (patch) | |
tree | 0c4d11993ca85eac861b83163885c2160a11113b | |
parent | 5d4a0a39bee1fd1abd1a04e0614c75755df4485d (diff) | |
download | fork-ledger-9e01d3948c5d91b6e921d0f412122536a30d3cdd.tar.gz fork-ledger-9e01d3948c5d91b6e921d0f412122536a30d3cdd.tar.bz2 fork-ledger-9e01d3948c5d91b6e921d0f412122536a30d3cdd.zip |
Removed an explicit path reference
-rw-r--r-- | python/server.py | 6 |
1 files changed, 4 insertions, 2 deletions
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 <DATA-FILE>" + sys.exit(1) main() |