configitems: register the 'gpg.key' config
authorBoris Feld <boris.feld@octobus.net>
Fri, 30 Jun 2017 03:42:34 +0200
changeset 34502 d54526c257af
parent 34501 b0c42fec8dc2
child 34503 0d5a1175d0f9
configitems: register the 'gpg.key' config
hgext/gpg.py
--- a/hgext/gpg.py	Fri Jun 30 03:42:33 2017 +0200
+++ b/hgext/gpg.py	Fri Jun 30 03:42:34 2017 +0200
@@ -36,6 +36,9 @@
 configitem('gpg', 'cmd',
     default='gpg',
 )
+configitem('gpg', 'key',
+    default=None,
+)
 
 class gpg(object):
     def __init__(self, path, key=None):
@@ -101,7 +104,7 @@
     gpgpath = ui.config("gpg", "cmd")
     gpgkey = opts.get('key')
     if not gpgkey:
-        gpgkey = ui.config("gpg", "key", None)
+        gpgkey = ui.config("gpg", "key")
     return gpg(gpgpath, gpgkey)
 
 def sigwalk(repo):