changeset 33466:9443a946efdc

configitems: register the 'bugzilla.timeout' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 07 Jul 2017 10:04:15 +0200
parents 9a36b964165e
children 6de2cd9d9258
files hgext/bugzilla.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/bugzilla.py	Fri Jul 07 10:04:13 2017 +0200
+++ b/hgext/bugzilla.py	Fri Jul 07 10:04:15 2017 +0200
@@ -366,6 +366,9 @@
 configitem('bugzilla', 'template',
     default=None,
 )
+configitem('bugzilla', 'timeout',
+    default=5,
+)
 
 class bzaccess(object):
     '''Base class for access to Bugzilla.'''
@@ -445,7 +448,7 @@
         user = self.ui.config('bugzilla', 'user', 'bugs')
         passwd = self.ui.config('bugzilla', 'password')
         db = self.ui.config('bugzilla', 'db')
-        timeout = int(self.ui.config('bugzilla', 'timeout', 5))
+        timeout = int(self.ui.config('bugzilla', 'timeout'))
         self.ui.note(_('connecting to %s:%s as %s, password %s\n') %
                      (host, db, user, '*' * len(passwd)))
         self.conn = bzmysql._MySQLdb.connect(host=host,