[Reproducible-commits] [misc] 01/03: clean-notes: give a useful error when the packages.yml is not found
Mattia Rizzolo
mattia at mapreri.org
Sat Sep 12 13:12:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
mapreri-guest pushed a commit to branch master
in repository misc.
commit 4992c472c39668b86e69cb7658d061c5dd6eb024
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Sat Sep 12 13:06:55 2015 +0000
clean-notes: give a useful error when the packages.yml is not found
---
clean-notes | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/clean-notes b/clean-notes
index e94a805..9f2f1ff 100755
--- a/clean-notes
+++ b/clean-notes
@@ -9,6 +9,7 @@
# Depends: python3 python3-apt python3-yaml python3-requests python3-psycopg2
import apt
+import sys
import json
import yaml
import logging
@@ -241,8 +242,13 @@ def load_reproducible_status():
return status
def load_notes():
- with open(NOTES_YAML, encoding='utf-8') as f:
- return yaml.safe_load(f)
+ try:
+ with open(NOTES_YAML, encoding='utf-8') as f:
+ return yaml.safe_load(f)
+ except FileNotFoundError:
+ log.error('%s has not been found in your current directory. Please cd'
+ ' to the notes directory', NOTES_YAML)
+ sys.exit(1)
def check_notes_validity(notes, testedpkgs):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git
More information about the Reproducible-commits
mailing list