Skip to content

Commit 373ecf3

Browse files
conditional
in case hostname -I just returns IPV4 address fallback to feild 0
1 parent 71dc689 commit 373ecf3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

utils/info.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
from funs import *
33

44
######## VNC
5-
IPv4Address=os.system("hostname -I | cut -d \" \" -f 2")
5+
if os.system("hostname -I | cut -d \" \" -f 2") is None:
6+
IPv4Address = os.system("hostname -I")
7+
else:
8+
IPv4Address = os.system("hostname -I | cut -d \" \" -f 2")
9+
610
LOCALIP="127.0.0.1"
711

812
def vncokdialog(port):

0 commit comments

Comments
 (0)