[Python-modules-commits] [py-macaroon-bakery] 01/04: Import py-macaroon-bakery_0.0.6.orig.tar.gz

Colin Watson cjwatson at moszumanska.debian.org
Sat Nov 11 13:31:49 UTC 2017


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

cjwatson pushed a commit to branch master
in repository py-macaroon-bakery.

commit 949b7072cabce0daed6c94993ad44c8ea8648dbd
Author: Colin Watson <cjwatson at debian.org>
Date:   Fri Nov 10 15:50:40 2017 +0000

    Import py-macaroon-bakery_0.0.6.orig.tar.gz
---
 docs/conf.py                             | 2 +-
 macaroonbakery/httpbakery/agent/agent.py | 9 ++++++---
 setup.py                                 | 2 +-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index df296f1..a64ec3a 100755
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -63,7 +63,7 @@ copyright = u'2017, Juju UI Team'
 # the built documents.
 #
 # The short X.Y version and the full version.
-version = release = '0.0.4'
+version = release = '0.0.6'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/macaroonbakery/httpbakery/agent/agent.py b/macaroonbakery/httpbakery/agent/agent.py
index 862f00e..ad56015 100644
--- a/macaroonbakery/httpbakery/agent/agent.py
+++ b/macaroonbakery/httpbakery/agent/agent.py
@@ -6,6 +6,7 @@ import json
 
 import nacl.public
 import nacl.encoding
+import nacl.exceptions
 import requests.cookies
 import six
 from six.moves.urllib.parse import urlparse
@@ -35,8 +36,10 @@ def load_agent_file(filename, cookies=None):
     with open(filename) as f:
         data = json.load(f)
     try:
-        key = nacl.public.PrivateKey(data['key']['private'],
-                                     nacl.encoding.Base64Encoder)
+        key = nacl.public.PrivateKey(
+            data['key']['private'],
+            nacl.encoding.Base64Encoder,
+        )
         if cookies is None:
             cookies = requests.cookies.RequestsCookieJar()
         for agent in data['agents']:
@@ -54,7 +57,7 @@ def load_agent_file(filename, cookies=None):
                                                     path=u.path)
             cookies.set_cookie(cookie)
         return cookies, key
-    except (KeyError, ValueError) as e:
+    except (KeyError, ValueError, nacl.exceptions.TypeError) as e:
         raise AgentFileFormatError('invalid agent file', e)
 
 
diff --git a/setup.py b/setup.py
index 340bf3a..40155f9 100755
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ from setuptools import (
 
 PROJECT_NAME = 'macaroonbakery'
 
-VERSION = (0, 0, 5)
+VERSION = (0, 0, 6)
 
 
 def get_version():

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/py-macaroon-bakery.git



More information about the Python-modules-commits mailing list