From 60cd43f1145433c663bffdab330d1b5241e6f984 Mon Sep 17 00:00:00 2001 From: Johann Og Date: Tue, 7 Feb 2017 12:55:05 +0100 Subject: [PATCH] Fix crash for invalid URI --- src/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools.py b/src/tools.py index 516d7b8..06f50af 100644 --- a/src/tools.py +++ b/src/tools.py @@ -69,7 +69,7 @@ def parse_mongo_uri(conn): conn = conn.split('://')[-1] try: uri = uri_parser.parse_uri("mongodb://" + conn) - except uri_parser.InvalidURI: + except (uri_parser.InvalidURI, ValueError): return None else: return uri