====
[plcapi.git] / PLC / Auth.py
index 2b93622..3be444b 100644 (file)
@@ -85,8 +85,8 @@ class GPGAuth(Auth):
                 keys = Keys(method.api, {'key_id': person['key_ids'], 'key_type': "gpg", 'peer_id': None})
                 gpg_keys = [ key['key'] for key in keys ]
 
-            if not keys:
-                raise PLCAuthenticationFailure, "GPGAuth: No GPG key on record for peer or user '%s'"
+            if not gpg_keys:
+                raise PLCAuthenticationFailure, "GPGAuth: No GPG key on record for peer or user '%s'"%auth['name']
 
             for gpg_key in gpg_keys:
                 try: