Skip to content

Commit

Permalink
use a more accurate description of the getting IP address error
Browse files Browse the repository at this point in the history
  • Loading branch information
vikdevelop authored Jul 2, 2024
1 parent c111eb4 commit 727eb37
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@

# Get IP address of device for synchronizing computers in the network
try:
# Get IP address of user computer
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
IPAddr = s.getsockname()[0]
s.close()
except:
IPAddr = "ERR: You are not connected to the internet!"
except Exception as err:
IPAddr = f"ERR: {err}"

# Set application version, and icon
v = "3.3"
Expand Down

0 comments on commit 727eb37

Please sign in to comment.