From f78e0666130ec57a019ae7db6b7f787dfd6b3e61 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Fri, 20 Apr 2018 22:43:08 +0200 Subject: write commitscript also without bug number --- scripts/tatt | 4 ++-- tatt/scriptwriter.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/tatt b/scripts/tatt index ce0480a..33fe8c8 100755 --- a/scripts/tatt +++ b/scripts/tatt @@ -276,10 +276,10 @@ if myJob.packageList is not None and len(myJob.packageList) > 0: writeUSE(myJob, config) writeRdeps(myJob, config) writeCleanup (myJob, config) - ## Config and Successscript can only be written if we have a bugnumber + ## Successscript can only be written if we have a bugnumber if myJob.bugnumber: writeSuccess(myJob, config) - writeCommit(myJob, config) + writeCommit(myJob, config) sys.exit (0) # Code for resolving bugs (-r and -m) diff --git a/tatt/scriptwriter.py b/tatt/scriptwriter.py index 5da4f67..10f6cae 100644 --- a/tatt/scriptwriter.py +++ b/tatt/scriptwriter.py @@ -32,6 +32,8 @@ def scriptTemplate(job, config, filename): snippet = snippet.replace("@@EMERGEOPTS@@", config['emergeopts']) if job.bugnumber: snippet = snippet.replace("@@BUG@@", job.bugnumber) + else: + snippet = snippet.replace("@@BUG@@", '') snippet = snippet.replace("@@JOB@@", job.name) snippet = snippet.replace("@@ARCH@@", config['arch']) snippet = snippet.replace("@@REPODIR@@", config['repodir']) -- cgit v1.2.3-65-gdbad