From: Eric S. Raymond Date: Fri, 6 Oct 2006 11:00:25 +0000 (+0000) Subject: Replay facility now captures command-line options. X-Git-Tag: 2.0~142 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=fe17a8a96e60187ab5cce6d2eac24e81d4d2406f;p=super-star-trek.git Replay facility now captures command-line options. --- diff --git a/src/sst.py b/src/sst.py index eb44029..d30cab2 100644 --- a/src/sst.py +++ b/src/sst.py @@ -6851,11 +6851,13 @@ if __name__ == '__main__': except IOError: sys.stderr.write("sst: can't open replay file %s\n" % val) raise SystemExit, 1 - line = replayfp.readline().strip() try: + line = replayfp.readline().strip() (leader, key, seed) = line.split() seed = eval(seed) sys.stderr.write("sst2k: seed set to %s\n" % seed) + line = replayfp.readline().strip() + arguments += line.split()[2:] except ValueError: sys.stderr.write("sst: replay file %s is ill-formed\n"% val) os.exit(1) @@ -6876,6 +6878,7 @@ if __name__ == '__main__': sys.stderr.write("sst: warning, can't open logfile\n") if logfp: logfp.write("# seed %s\n" % seed) + logfp.write("# options %s\n" % " ".join(arguments)) random.seed(seed) iostart() if arguments: