grim/hgwebplus
Clone
Summary
Browse
Changes
Graph
Python2 compatible urllib loading.
2021-12-03, Tuomo Valkonen
0fb32c09b1ef
Parents
5958157b2ee1
Children
080ec4c84511
Python2 compatible urllib loading.
1 files changed, 4 insertions(+), 1 deletions(-)
+4
-1
src/hgwebplus.py
--- a/src/hgwebplus.py Sat Dec 04 05:23:42 2021 -0600
+++ b/src/hgwebplus.py Fri Dec 03 10:35:05 2021 +0200
@@ -31,7 +31,10 @@
from mercurial.hgweb import webutil, hgweb_mod, hgwebdir_mod
from mercurial.hgweb.common import paritygen
-from urllib.parse import urlparse
+try:
+ from urllib.parse import urlparse
+except ImportError:
+ from urlparse import urlparse
import mistune