From 66190e68206419879c4dfa919637e185b137cb64 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 29 Dec 2019 15:12:54 +0100 Subject: controller: Include dest template in temp file name Makes it easier to figure out which temporary file belongs to which job for the IRC bot. --- crocoite/controller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crocoite') diff --git a/crocoite/controller.py b/crocoite/controller.py index 4c9c4b3..8374b4e 100644 --- a/crocoite/controller.py +++ b/crocoite/controller.py @@ -427,7 +427,8 @@ class RecursiveController: return dest = tempfile.NamedTemporaryFile (dir=self.tempdir, - prefix=__package__, suffix='.warc.gz', delete=False) + prefix=os.path.basename (self.output) + '-', suffix='.warc.gz', + delete=False) command = list (map (formatCommand, self.command)) logger.info ('fetch', uuid='d1288fbe-8bae-42c8-af8c-f2fa8b41794f', command=command) -- cgit v1.2.3