Move code out of function into where it should be
This commit is contained in:
parent
53c000cb14
commit
a87b03a589
1 changed files with 3 additions and 5 deletions
|
@ -14,7 +14,8 @@ def load_servers():
|
|||
with open(servers_file,'r') as openfile:
|
||||
servers = json.load(openfile)
|
||||
else:
|
||||
create_server(True)
|
||||
print('\n!! Looks like you do not have any servers yet - Let\'s add one.\n')
|
||||
create_server()
|
||||
|
||||
# Write the contents to the servers variable to the servers_file.
|
||||
def write_servers():
|
||||
|
@ -42,11 +43,8 @@ def list_servers(mode=int(1)): # make sure a default is set.
|
|||
index += 1
|
||||
|
||||
# Creates new server dicts in the server array.
|
||||
def create_server(isfirstrun=False):
|
||||
def create_server():
|
||||
global servers
|
||||
if(isfirstrun):
|
||||
print('\n!! Looks like you do not have any servers yet - Let\'s add one.\n')
|
||||
|
||||
print('\n=== Add Server ===')
|
||||
srv_name = input('Name: ')
|
||||
srv_addr = input('Address: ')
|
||||
|
|
Loading…
Reference in a new issue