Patchwork [07,of,10] configitems: register the 'bugzilla.timeout' config

login
register
mail settings
Submitter Boris Feld
Date July 12, 2017, 12:41 p.m.
Message ID <5b67961350d4084c8e50.1499863290@FB>
Download mbox | patch
Permalink /patch/22259/
State Accepted
Headers show

Comments

Boris Feld - July 12, 2017, 12:41 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1499414655 -7200
#      Fri Jul 07 10:04:15 2017 +0200
# Node ID 5b67961350d4084c8e50c14826335f69711fa65d
# Parent  a8c4ac38c3d2f0e52653de1814a71fdc8801ee12
# EXP-Topic config.register.bugzilla
configitems: register the 'bugzilla.timeout' config

Patch

diff -r a8c4ac38c3d2 -r 5b67961350d4 hgext/bugzilla.py
--- a/hgext/bugzilla.py	Fri Jul 07 10:04:13 2017 +0200
+++ b/hgext/bugzilla.py	Fri Jul 07 10:04:15 2017 +0200
@@ -364,6 +364,9 @@ 
 configitem('bugzilla', 'template',
     default=None,
 )
+configitem('bugzilla', 'timeout',
+    default=5,
+)
 
 class bzaccess(object):
     '''Base class for access to Bugzilla.'''
@@ -443,7 +446,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,