Skip to content

Commit

Permalink
Merge pull request #1327 from bari12/patch-1324-Optional_paramiko_load
Browse files Browse the repository at this point in the history
Clients: Optional load of paramiko; Fix #1324
  • Loading branch information
bari12 committed Jul 10, 2018
2 parents 2602f60 + 1ffc6ad commit 22a6b71
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/rucio/common/utils.py
Expand Up @@ -96,7 +96,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 @@ -659,7 +662,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 22a6b71

Please sign in to comment.