[Reproducible-commits] [misc] 02/05: clean-notes: write as binary and encode to utf-8 (+ better comment)

Mattia Rizzolo mapreri-guest at moszumanska.debian.org
Wed Jan 7 00:11:55 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 f4e6f1076fde39afc40c898d28ed479bbbde11ac
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Tue Jan 6 22:36:39 2015 +0100

    clean-notes: write as binary and encode to utf-8 (+ better comment)
---
 clean-notes | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/clean-notes b/clean-notes
index 4cc3870..1296aea 100755
--- a/clean-notes
+++ b/clean-notes
@@ -19,7 +19,8 @@ reproducible_json = 'https://reproducible.debian.net/userContent/reproducible.js
 # [{package: xxx, suite: sid, version: 0.0.0, status: reproducible}, {...}]
 
 notes_yaml = 'packages.yml'
-# {package_name: {things..} }
+# {package_name: {version: 0.0.0, comments: "blablabla", bugs: [111, 222],
+#  issues: [issue1, issue2]}, {...}}
 
 parser = argparse.ArgumentParser(description = "housekeep the packages.yml file")
 group = parser.add_mutually_exclusive_group()
@@ -99,8 +100,8 @@ def write_out(notes):
             out += ("  bugs:\n")
             for bug in values['bugs']:
                 out += ("    - " + str(bug) + "\n")
-    with open('notes.yml', 'w') as fd:
-        fd.write(out)
+    with open('notes.yml', 'wb') as fd:
+        fd.write(out.encode('utf-8'))
 
 if __name__ == '__main__':
     testedpkgs = load_reproducible_status()

-- 
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