Skip to content
Permalink
Browse files

Fix a spurious error message in the symmetrix driver

error decoding password: %s 'NoneType' object has no attribute 'strip'

Try to decode only is the password keyword is set.
  • Loading branch information...
cvaroqui committed Jul 14, 2019
1 parent af377c3 commit 618adb5c046cb1ca4c00839cc63f1fd9a1ce47aa
Showing with 6 additions and 5 deletions.
  1. +6 −5 lib/rcSymmetrix.py
@@ -264,11 +264,12 @@ def __init__(self, objects=[], node=None):
username = self.node.oget(s, 'username')
password = self.node.oget(s, 'password')

try:
secname, namespace, _ = split_path(password)
password = factory("sec")(secname, namespace=namespace, volatile=True).decode_key("password")
except Exception as exc:
print("error decoding password: %s", exc, file=sys.stderr)
if password:
try:
secname, namespace, _ = split_path(password)
password = factory("sec")(secname, namespace=namespace, volatile=True).decode_key("password")
except Exception as exc:
print("error decoding password: %s", exc, file=sys.stderr)

symcfg = os.path.join(symcli_path, "symcfg")
if which(symcfg) is None:

0 comments on commit 618adb5

Please sign in to comment.
You can’t perform that action at this time.