# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import exceptions, re, urllib.parse
+from __future__ import division, print_function, unicode_literals
+
+import re
+try:
+ from urllib.parse import urlparse
+except ImportError:
+ from urlparse import urlparse
type_patterns = {
'checksums': re.compile(r"^snapshot-(.*)\.(\w+)sums$"),
'snapshots': re.compile(r"^snapshot-(.*)\.(cumulus|lbs)$")
}
-class NotFoundError(exceptions.KeyError):
+class NotFoundError(KeyError):
"""Exception thrown when a file is not found in a repository."""
pass
if cls != Store:
return super(Store, cls).__new__(cls, url, **kw)
(scheme, netloc, path, params, query, fragment) \
- = urllib.parse.urlparse(url)
+ = urlparse(url)
try:
cumulus = __import__('cumulus.store.%s' % scheme, globals())