Re: [PATCH rhel6-branch 1/7] iscsi: add iface binding support to discovery and setup GUI (#500273)

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

 



On 02/28/2012 07:31 PM, David Cantrell wrote:
Ack, with comments below.

On Tue, Feb 28, 2012 at 12:03:28PM +0100, Radek Vykydal wrote:

+    # This will modify behaviour of iscsi.discovery() function
+    if storage.iscsi.iscsi().mode == "none" and not bind:
+        storage.iscsi.iscsi().delete_interfaces()
+    elif (storage.iscsi.iscsi().mode == "none" and bind
+          or storage.iscsi.iscsi().mode == "bind"):
I'm not liking how this reads.  I can read it as:

     elif (storage.iscsi.iscsi().mode == "none" and bind) or \
          storage.iscsi.iscsi().mode == "bind"

or:

     elif storage.iscsi.iscsi().mode == "none" and \
          (storage.iscsi.iscsi().mode == "bind" or bind)

I say it needs better parens for readability.

I'll add parens.


+    def _getMode(self):
+        if not self.active_nodes():
+            return "none"
+        else:
+            if self.ifaces:
+                return "bind"
+            else:
+                return "default"
This if/else block doesn't really need to be in an else block by itself.

Sure, I'll fix it.

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux