Skip to content

Commit

Permalink
Clients: Optional load of paramiko; Fix rucio#1324
Browse files Browse the repository at this point in the history
  • Loading branch information
bari12 committed Jul 10, 2018
1 parent a91a9a0 commit 1ffc6ad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/rucio/common/utils.py
Expand Up @@ -97,7 +97,10 @@
from web import HTTPError

if EXTRA_MODULES['paramiko']:
from paramiko import RSAKey
try:
from paramiko import RSAKey
except Exception:
EXTRA_MODULES['paramiko'] = False

if EXTRA_MODULES['flask']:
from flask import Response
Expand Down Expand Up @@ -660,7 +663,7 @@ def ssh_sign(private_key, message):
:return: Base64 encoded signature as a string.
"""
if not EXTRA_MODULES['paramiko']:
raise MissingModuleException('The paramiko module is not installed.')
raise MissingModuleException('The paramiko module is not installed or faulty.')
sio_private_key = StringIO(private_key)
priv_k = RSAKey.from_private_key(sio_private_key)
sio_private_key.close()
Expand Down

0 comments on commit 1ffc6ad

Please sign in to comment.