Fixed Connected Icon
This commit is contained in:
27
CLI/Init.py
27
CLI/Init.py
@@ -16,18 +16,23 @@ class Config():
|
||||
AccountID = "NA"
|
||||
version = 01.02
|
||||
|
||||
class Server():
|
||||
host = "0.0.0.0" + ":5000"
|
||||
isReachable = False
|
||||
state = "Resolving IP"
|
||||
Icon = "🌐"
|
||||
if isReachable:
|
||||
Icon = "🌐"
|
||||
else:
|
||||
Icon = "⛔"
|
||||
class ServerObj():
|
||||
def __init__(self, isReachable=False):
|
||||
|
||||
self.host = "0.0.0.0" + ":5000"
|
||||
self.isReachable = False
|
||||
self.state = "Resolving IP"
|
||||
|
||||
@property
|
||||
def Icon(self):
|
||||
|
||||
if self.isReachable:
|
||||
return "🌐"
|
||||
else:
|
||||
return "⛔"
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
Server = ServerObj()
|
||||
|
||||
#declare files
|
||||
config = configparser.ConfigParser()
|
||||
@@ -119,7 +124,7 @@ def loadConfig():
|
||||
|
||||
def grabServerResolver():
|
||||
try:
|
||||
response = requests.get("https://kevinblog.sytes.net/APIhS/test1.php")
|
||||
response = requests.get("https://kevinblog.sytes.net/APIS/test1.php")
|
||||
response.raise_for_status()
|
||||
|
||||
data = response.json()
|
||||
|
||||
Reference in New Issue
Block a user