forked from ungleich-public/cdist
		
	cleanup local
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								72fb77f135
							
						
					
				
			
			
				commit
				
					
						64bb1741aa
					
				
			
		
					 1 changed files with 1 additions and 13 deletions
				
			
		| 
						 | 
					@ -32,18 +32,6 @@ import logging
 | 
				
			||||||
import cdist
 | 
					import cdist
 | 
				
			||||||
from cdist import core
 | 
					from cdist import core
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
class LocalScriptError(cdist.Error):
 | 
					 | 
				
			||||||
    def __init__(self, script, command, script_content):
 | 
					 | 
				
			||||||
        self.script = script
 | 
					 | 
				
			||||||
        self.command = command
 | 
					 | 
				
			||||||
        self.script_content = script_content
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def __str__(self):
 | 
					 | 
				
			||||||
        plain_command = " ".join(self.command)
 | 
					 | 
				
			||||||
        return "Local script execution failed: %s" % plain_command
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class Local(object):
 | 
					class Local(object):
 | 
				
			||||||
    """Execute commands locally.
 | 
					    """Execute commands locally.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -131,4 +119,4 @@ class Local(object):
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
                os.symlink(src, dst)
 | 
					                os.symlink(src, dst)
 | 
				
			||||||
            except OSError as e:
 | 
					            except OSError as e:
 | 
				
			||||||
                raise cdist.Error("Linking emulator from " + src + " to " + dst + " failed: " + e.__str__())
 | 
					                raise cdist.Error("Linking emulator from %s to %s failed: %s" % (src, dst, e.__str__()))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue