2.0 ready
diff --git a/wally/ssh_utils.py b/wally/ssh_utils.py
index bd73f05..e77b9a8 100644
--- a/wally/ssh_utils.py
+++ b/wally/ssh_utils.py
@@ -365,11 +365,12 @@
 
 def connect(uri, **params):
     if uri == 'local':
-        return Local()
-
-    creds = parse_ssh_uri(uri)
-    creds.port = int(creds.port)
-    return ssh_connect(creds, **params)
+        res = Local()
+    else:
+        creds = parse_ssh_uri(uri)
+        creds.port = int(creds.port)
+        res = ssh_connect(creds, **params)
+    return res
 
 
 all_sessions_lock = threading.Lock()