diff mercurial/hgweb/hgwebdir_mod.py @ 6217:fe8dbbe9520d

Avoid importing mercurial.node/mercurial.repo stuff from mercurial.hg
author Joel Rosdahl <joel@rosdahl.net>
date Thu, 06 Mar 2008 22:51:16 +0100
parents 942287cb1f57
children 2eb18c780287
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Mar 06 22:23:41 2008 +0100
+++ b/mercurial/hgweb/hgwebdir_mod.py	Thu Mar 06 22:51:16 2008 +0100
@@ -8,6 +8,7 @@
 
 import os
 from mercurial.i18n import gettext as _
+from mercurial.repo import RepoError
 from mercurial import ui, hg, util, templater, templatefilters
 from common import ErrorResponse, get_mtime, staticfile, style_map, paritygen,\
                    get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
@@ -110,7 +111,7 @@
                         except IOError, inst:
                             msg = inst.strerror
                             raise ErrorResponse(HTTP_SERVER_ERROR, msg)
-                        except hg.RepoError, inst:
+                        except RepoError, inst:
                             raise ErrorResponse(HTTP_SERVER_ERROR, str(inst))
 
                     # browse subdirectories