move TYPE_PREFIX back into main, as it's only needed there and should work without module
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								16d58dcac7
							
						
					
				
			
			
				commit
				
					
						3f6c479d72
					
				
			
		
					 2 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -34,6 +34,8 @@ import tempfile
 | 
			
		|||
 | 
			
		||||
log = logging.getLogger(__name__)
 | 
			
		||||
 | 
			
		||||
TYPE_PREFIX = "__"
 | 
			
		||||
 | 
			
		||||
class Cdist:
 | 
			
		||||
    """Cdist main class to hold arbitrary data"""
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -482,7 +484,7 @@ if __name__ == "__main__":
 | 
			
		|||
            '../lib')))
 | 
			
		||||
        import cdist
 | 
			
		||||
 | 
			
		||||
        if re.match(cdist.TYPE_PREFIX, os.path.basename(sys.argv[0])):
 | 
			
		||||
        if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])):
 | 
			
		||||
            emulator()
 | 
			
		||||
        else:
 | 
			
		||||
            import cdist.banner
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,7 +19,6 @@
 | 
			
		|||
#
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
TYPE_PREFIX = "__"
 | 
			
		||||
VERSION     = "2.0.2"
 | 
			
		||||
 | 
			
		||||
class Error(Exception):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue