Re: [PATCH rhel6-branch] (take II) Account for ipv6 addresses too (#605659)

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

 



> @@ -509,8 +510,11 @@ def isWireless(dev):
>      else:
>          return False
>  
> -# Get the IP address for a network device.
> -def getIPAddress(dev):
> +# Get IP addresses for a network device.
> +# Returns list of ipv4 and ipv6 addresses.
> +# With version=4 returns only ipv4 addresses,
> +# with version=6 returns only ipv6 addresses.
> +def getIPAddresses(dev, version=None):
>      if dev == '' or dev is None:
>         return None
>  

My only other suggestion would be that version= defaults to something
besides None.  And then the tests below use "if version ==" instead of
the inverted form.  That makes much more sense to me.  Right now,
passing None for version means you get the whole list.

Provided you've tested this for syntactic correctness, I'm fine with you
committing this patch with the above modification.

- Chris

_______________________________________________
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