submit string on failed error
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								9036f8c4cc
							
						
					
				
			
			
				commit
				
					
						ff2d5629d6
					
				
			
		
					 1 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
					@ -30,7 +30,7 @@ def logger(type, *args):
 | 
				
			||||||
   print(*args)
 | 
					   print(*args)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def exit_error(*args):
 | 
					def exit_error(*args):
 | 
				
			||||||
   logger("error", args)
 | 
					   logger("error", *args)
 | 
				
			||||||
   sys.exit(1)
 | 
					   sys.exit(1)
 | 
				
			||||||
   
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -42,8 +42,8 @@ def run_or_fail(*args):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   try:
 | 
					   try:
 | 
				
			||||||
      subprocess.check_call(newargs)
 | 
					      subprocess.check_call(newargs)
 | 
				
			||||||
   except CalledProcessError:
 | 
					   except subprocess.CalledProcessError:
 | 
				
			||||||
      exit_error("Command failed:", newargs)
 | 
					      exit_error("Command failed:", " ".join(newargs))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def remote_run_or_fail(hostname, *args):
 | 
					def remote_run_or_fail(hostname, *args):
 | 
				
			||||||
   """Run something on the remote side and fail is something breaks"""
 | 
					   """Run something on the remote side and fail is something breaks"""
 | 
				
			||||||
| 
						 | 
					@ -104,8 +104,6 @@ def global_explore(hostname):
 | 
				
			||||||
   for explorer in explorers:
 | 
					   for explorer in explorers:
 | 
				
			||||||
      remote_run_or_fail(hostname, [remote_global_explorer_path(explorer)])
 | 
					      remote_run_or_fail(hostname, [remote_global_explorer_path(explorer)])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   remote_run_or_fail(hostname, [remote_global_explorer_path("moo")])
 | 
					 | 
				
			||||||
      
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
def init_deploy(hostname):
 | 
					def init_deploy(hostname):
 | 
				
			||||||
   logger("info", "Creating clean directory structure")
 | 
					   logger("info", "Creating clean directory structure")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue