From dcddc10a5032996474e157946b00b8df039eebda Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Wed, 26 Nov 2014 20:01:20 +0100 Subject: [test_unicode_literals] Arm unicode_literals check From now on, the line from __future__ import unicode_literals should be contained in every single Python file lest we run into any more 2.x/3.x issues. Going forward, we're likely to develop on 3.x only and would likely miss subtle bugs otherwise. --- devscripts/gh-pages/sign-versions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'devscripts/gh-pages/sign-versions.py') diff --git a/devscripts/gh-pages/sign-versions.py b/devscripts/gh-pages/sign-versions.py index 953a5162e..fa389c358 100755 --- a/devscripts/gh-pages/sign-versions.py +++ b/devscripts/gh-pages/sign-versions.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +from __future__ import unicode_literals, with_statement import rsa import json @@ -29,4 +30,5 @@ signature = hexlify(rsa.pkcs1.sign(json.dumps(versions_info, sort_keys=True).enc print('signature: ' + signature) versions_info['signature'] = signature -json.dump(versions_info, open('update/versions.json', 'w'), indent=4, sort_keys=True) +with open('update/versions.json', 'w') as versionsf: + json.dump(versions_info, versionsf, indent=4, sort_keys=True) -- cgit v1.2.3