[PATCH 33/37] Handle rtslib returning iterables instead of lists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Andy Grover <agrover@xxxxxxxxxx>
---
 targetcli/ui_backstore.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py
index fc10cfc..d41e98e 100644
--- a/targetcli/ui_backstore.py
+++ b/targetcli/ui_backstore.py
@@ -98,7 +98,7 @@ class UIBackstore(UINode):
         else:
             hba = child.rtsnode.backstore
             child.rtsnode.delete()
-            if not hba.storage_objects:
+            if not list(hba.storage_objects):
                 hba.delete()
             self.remove_child(child)
             self.shell.log.info("Deleted storage object %s." % name)
@@ -376,7 +376,7 @@ class UIStorageObject(UIRTSLibNode):
         legacy = []
         if self.rtsnode.name != self.name:
             legacy.append("ADDED SUFFIX")
-        if len(self.rtsnode.backstore.storage_objects) > 1:
+        if len(list(self.rtsnode.backstore.storage_objects)) > 1:
             legacy.append("SHARED HBA")
 
         if legacy:
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux