# HG changeset patch # User Jeff Hammel # Date 1604441799 28800 # Node ID 6cb7621072149e418c94a00254b683cf567e2cd9 # Parent 8a3b8fee1df2a187cd882c26792b2be146568ac7 py3 diff -r 8a3b8fee1df2 -r 6cb762107214 bitsyblog/bitsyblog.py --- a/bitsyblog/bitsyblog.py Tue Nov 03 14:14:29 2020 -0800 +++ b/bitsyblog/bitsyblog.py Tue Nov 03 14:16:39 2020 -0800 @@ -25,9 +25,15 @@ from paste.fileapp import FileApp from pkg_resources import iter_entry_points from pkg_resources import resource_filename -from urlparse import urlparse from webob import Request, Response, exc +try: + # python2 + from urlparse import urlparse +except ImportError: + # python3 + from urllib.parse import urlparse + class BlogPathException(Exception): """exception when trying to retrieve the blog"""