diff options
author | Andy Grover <agrover@redhat.com> | 2014-11-13 12:12:20 -0800 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2014-11-13 13:41:12 -0800 |
commit | 87744879965838f86d99bc8b41322b5551eb15ac (patch) | |
tree | 75ec7802a7bbb9810b0fa7583694ec4379f516e1 | |
parent | a3182301b10f1a2be0f26d9d6204021a4b8deac5 (diff) | |
download | targetcli-87744879965838f86d99bc8b41322b5551eb15ac.tar.gz |
Use any() for seeing if fm.wwns generates anything
Slightly more efficient.
Signed-off-by: Andy Grover <agrover@redhat.com>
-rw-r--r-- | targetcli/ui_root.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/targetcli/ui_root.py b/targetcli/ui_root.py index 472d6e0..80e875e 100644 --- a/targetcli/ui_root.py +++ b/targetcli/ui_root.py @@ -53,7 +53,7 @@ class UIRoot(UINode): # only show fabrics present in the system for fm in self.rtsroot.fabric_modules: - if fm.wwns == None or list(fm.wwns) != []: + if fm.wwns == None or any(fm.wwns): UIFabricModule(fm, self) def ui_command_saveconfig(self, savefile=default_save_file): |