Python wrapper for running instances of trisurf-ng
Samo Penic
2017-01-27 20db829c3a764ae1ea8ff79412bc7e0e9a6c92a9
Fixes.
1 files modified
8 ■■■■ changed files
trisurf/tsmgr.py 8 ●●●● patch | view | raw | blame | history
trisurf/tsmgr.py
@@ -291,16 +291,20 @@
        hosts=({'name':socket.gethostname(),'address':'127.0.0.1', 'runs':hosts},)
    #find the host at which the action is attended
#    print(args)
    if args['host']==None:
        #Only status and version commands are automatically executed on all the hosts. stopping or starting  or other actions is not!
        if(args['status']==False and args['version']==False):
            hosts=getListOfHostConfigurationByHostname(hosts,socket.gethostname())
#        if(args['status']==False and args['version']==False and):
#        hosts=getListOfHostConfigurationByHostname(hosts,socket.gethostname())
        pass
    else:
        hosts=getListOfHostConfigurationByHostname(hosts,args['host'])
    if len(hosts)==0:
        print ('Hostname "{}" does not exist in configuration file. Please check the spelling'.format(args['host'][0]))
        exit(1)
    if not args['local_only']:
#            print("copying to remotes, DEBUG")
#            print(hosts)
            hosts=copyConfigAndConnect(hosts)
    #do local stuff:
    for host in hosts: