summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Grover <andy@groveronline.com>2016-01-08 15:12:56 -0800
committerAndy Grover <andy@groveronline.com>2016-01-08 15:12:56 -0800
commit598af739d2918412aa51b3b635f5d1e90c805350 (patch)
tree95f778edc36e8ac413461540bcba6cbf9832af29
parentf17b77d47def7141e10a740d04b721d3d9f97b05 (diff)
parentc4d26669558674805620f96e070939cca964ab09 (diff)
downloadrtslib-fb-598af739d2918412aa51b3b635f5d1e90c805350.tar.gz
Merge pull request #68 from mulkieran/master-pyudev-fix
Use find_parent instead of parent.
-rw-r--r--rtslib/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rtslib/utils.py b/rtslib/utils.py
index e5f1c4d..a763bcc 100644
--- a/rtslib/utils.py
+++ b/rtslib/utils.py
@@ -231,8 +231,8 @@ def _hctl_from_dev(device):
@returns: H:C:T:L specifier or None if not found
@rtype: list of int * 4 or NoneType
'''
- parent = device.parent
- if parent is None or parent.subsystem != 'scsi':
+ parent = device.find_parent(subsystem='scsi')
+ if parent is None:
return None
try: