src/eric7/MicroPython/EthernetDialogs/IPv4AddressDialog.py

branch
eric7
changeset 10153
ffe7432f716b
parent 9878
a82014a9e57b
child 10439
21c28b0f9e41
--- a/src/eric7/MicroPython/EthernetDialogs/IPv4AddressDialog.py	Wed Aug 02 17:22:20 2023 +0200
+++ b/src/eric7/MicroPython/EthernetDialogs/IPv4AddressDialog.py	Thu Aug 03 17:33:07 2023 +0200
@@ -64,16 +64,20 @@
         """
         Public method to get the entered IPv4 address.
 
-        @return tuple containing the IPv4 address, the netmask, the gateway address and
-            the resolver address or the string 'dhcp' if dynamic addressing was selected
-        @rtype tuple (str, str, str, str) or str
+        @return tuple containing a tuple of the IPv4 address, the netmask, the gateway
+            address and the resolver address or the string 'dhcp' if dynamic addressing
+            was selected and the hostname for the device
+        @rtype tuple of ((str, str, str, str), str) or (str, str)
         """
         if self.dhcpCheckBox.isChecked():
-            return "dhcp"
+            return "dhcp", self.hostnameEdit.text()
         else:
             return (
-                self.addressEdit.text(),
-                self.netmaskEdit.text(),
-                self.gatewayEdit.text(),
-                self.dnsEdit.text(),
+                (
+                    self.addressEdit.text(),
+                    self.netmaskEdit.text(),
+                    self.gatewayEdit.text(),
+                    self.dnsEdit.text(),
+                ),
+                self.hostnameEdit.text(),
             )

eric ide

mercurial