home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42484b3
)
Server/py: Add command line parser for replay option.
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 17 Feb 2015 01:56:06 +0000
(
02:56
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 17 Feb 2015 01:56:06 +0000
(
02:56
+0100)
plomrogue-server.py
patch
|
blob
|
history
diff --git
a/plomrogue-server.py
b/plomrogue-server.py
index bcd985d22b6929c7605c5148ab1edf64ea14b537..1e4eda149eaa69451e865ca2dca1d2e0a6366bcb 100755
(executable)
--- a/
plomrogue-server.py
+++ b/
plomrogue-server.py
@@
-1,3
+1,4
@@
+import argparse
import errno
import os
import time
@@
-57,6
+58,11
@@
def detect_atomic_leftover(path):
io_db = {}
try:
+ parser = argparse.ArgumentParser(add_help=False)
+ parser.add_argument('-s', nargs='?', type=int, dest='replay', const=1,
+ action='store')
+ args, unknown = parser.parse_known_args()
+ print("Replay: " + str(args.replay))
print("DUMMY: Obey command-line arguments.")
print("DUMMY: Open files.")
setup_server_io(io_db)