only setup library path in main, not emulator
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								3f6c479d72
							
						
					
				
			
			
				commit
				
					
						4eec4d9627
					
				
			
		
					 1 changed files with 5 additions and 6 deletions
				
			
		
							
								
								
									
										11
									
								
								bin/cdist
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								bin/cdist
									
										
									
									
									
								
							| 
						 | 
					@ -478,15 +478,14 @@ if __name__ == "__main__":
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')
 | 
					        logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        # Import generic cdist options
 | 
					 | 
				
			||||||
        sys.path.insert(0, 
 | 
					 | 
				
			||||||
            os.path.abspath(os.path.join(os.path.dirname(__file__),
 | 
					 | 
				
			||||||
            '../lib')))
 | 
					 | 
				
			||||||
        import cdist
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])):
 | 
					        if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])):
 | 
				
			||||||
            emulator()
 | 
					            emulator()
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
 | 
					            cdist_lib = os.path.abspath(os.path.join(os.path.dirname(__file__),
 | 
				
			||||||
 | 
					                '../lib'))
 | 
				
			||||||
 | 
					            sys.path.insert(0, cdist_lib)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            import cdist
 | 
				
			||||||
            import cdist.banner
 | 
					            import cdist.banner
 | 
				
			||||||
            import cdist.exec
 | 
					            import cdist.exec
 | 
				
			||||||
            import cdist.path
 | 
					            import cdist.path
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue