mercurial/hgweb/hgwebdir_mod.py
changeset 34251 fe5202bef5ce
parent 34250 d24816dfdcff
child 34252 945c9816ec1d
--- a/mercurial/hgweb/hgwebdir_mod.py	Fri Jun 30 03:45:49 2017 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Fri Jun 30 03:45:50 2017 +0200
@@ -29,6 +29,7 @@
 from .request import wsgirequest
 
 from .. import (
+    configitems,
     encoding,
     error,
     hg,
@@ -124,10 +125,11 @@
         self.refresh()
 
     def refresh(self):
-        refreshinterval = 20
         if self.ui:
-            refreshinterval = self.ui.configint('web', 'refreshinterval',
-                                                refreshinterval)
+            refreshinterval = self.ui.configint('web', 'refreshinterval')
+        else:
+            item = configitems.coreitems['web']['refreshinterval']
+            refreshinterval = item.default
 
         # refreshinterval <= 0 means to always refresh.
         if (refreshinterval > 0 and