Skip to content
Snippets Groups Projects
Commit 3573a665 authored by Sebastien Luttringer's avatar Sebastien Luttringer
Browse files

Paramiko is not a hard dependency.

We can now use installsystems without paramiko
parent b0bbc2e7
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,6 @@ import re ...@@ -11,7 +11,6 @@ import re
import hashlib import hashlib
import shutil import shutil
import urllib2 import urllib2
import paramiko
import time import time
from progressbar import ProgressBar, Percentage, FileTransferSpeed from progressbar import ProgressBar, Percentage, FileTransferSpeed
...@@ -126,6 +125,11 @@ class PipeFile(object): ...@@ -126,6 +125,11 @@ class PipeFile(object):
''' '''
Open current fo from an ssh connection Open current fo from an ssh connection
''' '''
# try to load paramiko
try:
import paramiko
except ImportError:
raise IOError("URL type not supported")
# parse url # parse url
(login, passwd, host, port, path) = re.match( (login, passwd, host, port, path) = re.match(
"ssh://(([^:]+)(:([^@]+))?@)?([^/:]+)(:(\d+))?(/.*)?", path).group(2, 4, 5, 7, 8) "ssh://(([^:]+)(:([^@]+))?@)?([^/:]+)(:(\d+))?(/.*)?", path).group(2, 4, 5, 7, 8)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment