[Qa-jenkins-scm] [jenkins.debian.net] 05/07: reproducible Debian: actually wrap the bit that can fail in th try-except!

Holger Levsen holger at layer-acht.org
Mon Nov 7 17:13:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 0e4f501c0ec4e3a5c59adde9df4bb2d97bb71285
Author: Chris Lamb <lamby at debian.org>
Date:   Mon Nov 7 13:26:43 2016 +0000

    reproducible Debian: actually wrap the bit that can fail in th try-except!
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_create_meta_pkg_sets.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh
index 4662186..38b27fb 100755
--- a/bin/reproducible_create_meta_pkg_sets.sh
+++ b/bin/reproducible_create_meta_pkg_sets.sh
@@ -31,17 +31,17 @@ tails_build_manifest_to_deb822() {
 	ALL_PKGS=$(python3 - "$tmpfile" <<EOF
 import sys
 import yaml
-with open(sys.argv[1]) as fd:
-	manifest = yaml.load(fd)
-	seen = set()
-	try:
+try:
+	with open(sys.argv[1]) as fd:
+		manifest = yaml.load(fd)
+		seen = set()
 		for pkg in (manifest['packages']['binary'] + manifest['packages']['source']):
 			pkgname = pkg['package']
 			if pkgname not in seen:
 				print(pkgname, end='|')
 				seen.add(pkgname)
-	except Exception as exc:
-		print("Warning: something went wrong while parsing the build manifest as YAML file: {}".format(exc))
+except Exception as exc:
+	print("Warning: something went wrong while parsing the build manifest as YAML file: {}".format(exc))
 
 EOF
 )

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list