X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fsst.py;fp=src%2Fsst.py;h=9eaf77dc990a98fab700f7eb927dc613f1298a3c;hp=00f6df3dfa65ec08b449a6fa8c933283ebca08ca;hb=fcc0982757ef9c87939a9bff808e93064a28f688;hpb=69d62e1d65aaca729abae8eea7fc5c50f345bc43 diff --git a/src/sst.py b/src/sst.py index 00f6df3..9eaf77d 100644 --- a/src/sst.py +++ b/src/sst.py @@ -6197,8 +6197,12 @@ if __name__ == '__main__': sys.stderr.write("usage: sst [-t] [-x] [startcommand...].\n") raise SystemExit, 1 # where to save the input in case of bugs + if "TMPDIR" in os.environ: + tmpdir = os.environ['TMPDIR'] + else: + tmpdir = "/tmp" try: - logfp = open("/tmp/sst-input.log", "w") + logfp = open(os.path.join(tmpdir, "sst-input.log"), "w") except IOError: sys.stderr.write("sst: warning, can't open logfile\n") sys.exit(1)