From fe17a8a96e60187ab5cce6d2eac24e81d4d2406f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 6 Oct 2006 11:00:25 +0000 Subject: [PATCH] Replay facility now captures command-line options. --- src/sst.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- 2.31.1