cleanup logger stuff, remove more path stuff from cdist bin
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								8f2e5bb8c8
							
						
					
				
			
			
				commit
				
					
						e6a903fd96
					
				
			
		
					 3 changed files with 2 additions and 15 deletions
				
			
		
							
								
								
									
										10
									
								
								bin/cdist
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								bin/cdist
									
										
									
									
									
								
							| 
						 | 
					@ -48,16 +48,6 @@ BANNER = """
 | 
				
			||||||
   "P'        ""         ""
 | 
					   "P'        ""         ""
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Given paths from installation
 | 
					 | 
				
			||||||
REMOTE_BASE_DIR                 = "/var/lib/cdist"
 | 
					 | 
				
			||||||
REMOTE_CONF_DIR                 = os.path.join(REMOTE_BASE_DIR, "conf")
 | 
					 | 
				
			||||||
REMOTE_OBJECT_DIR               = os.path.join(REMOTE_BASE_DIR, "object")
 | 
					 | 
				
			||||||
REMOTE_TYPE_DIR                 = os.path.join(REMOTE_CONF_DIR, "type")
 | 
					 | 
				
			||||||
REMOTE_GLOBAL_EXPLORER_DIR      = os.path.join(REMOTE_CONF_DIR, "explorer")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CODE_HEADER                     = "#!/bin/sh -e\n"
 | 
					 | 
				
			||||||
DOT_CDIST                       = ".cdist"
 | 
					 | 
				
			||||||
TYPE_PREFIX                     = "__"
 | 
					 | 
				
			||||||
VERSION                         = "2.0.1"
 | 
					VERSION                         = "2.0.1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')
 | 
					logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,9 +22,7 @@
 | 
				
			||||||
import logging
 | 
					import logging
 | 
				
			||||||
import subprocess
 | 
					import subprocess
 | 
				
			||||||
 | 
					
 | 
				
			||||||
logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')
 | 
					log = logging.getLogger(__name__)
 | 
				
			||||||
log = logging.getLogger()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
def shell_run_or_debug_fail(script, *args, **kargs):
 | 
					def shell_run_or_debug_fail(script, *args, **kargs):
 | 
				
			||||||
    # Manually execute /bin/sh, because sh -e does what we want
 | 
					    # Manually execute /bin/sh, because sh -e does what we want
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -35,8 +35,7 @@ CODE_HEADER                     = "#!/bin/sh -e\n"
 | 
				
			||||||
DOT_CDIST                       = ".cdist"
 | 
					DOT_CDIST                       = ".cdist"
 | 
				
			||||||
TYPE_PREFIX                     = "__"
 | 
					TYPE_PREFIX                     = "__"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')
 | 
					log = logging.getLogger(__name__)
 | 
				
			||||||
log = logging.getLogger()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
import cdist.exec
 | 
					import cdist.exec
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue