From dd9ac9e9e7edc861a7176e6bed6d23c3a726d0b4 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 24 Apr 2015 15:16:32 +0200 Subject: [PATCH] only cosmetic --- source/BootManager.py | 28 ++++++++++++++-------------- source/steps/InstallInit.py | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/source/BootManager.py b/source/BootManager.py index 5270c6c..df15c37 100755 --- a/source/BootManager.py +++ b/source/BootManager.py @@ -71,13 +71,13 @@ class log: format="%H:%M:%S(%Z) " - def __init__( self, OutputFilePath= None ): + def __init__(self, OutputFilePath=None): try: - self.OutputFile= open( OutputFilePath, "w") - self.OutputFilePath= OutputFilePath + self.OutputFile = open( OutputFilePath, "w") + self.OutputFilePath = OutputFilePath except: print( "bootmanager log : Unable to open output file %r, continuing"%OutputFilePath ) - self.OutputFile= None + self.OutputFile = None self.VARS = None try: @@ -87,34 +87,34 @@ class log: self.LogEntry( str(e) ) return - def LogEntry( self, str, inc_newline= 1, display_screen= 1 ): - now=time.strftime(log.format, time.localtime()) + def LogEntry(self, str, inc_newline = 1, display_screen = 1 ): + now = time.strftime(log.format, time.localtime()) if self.OutputFile: - self.OutputFile.write( now+str ) + self.OutputFile.write(now + str) if display_screen: - sys.stdout.write( now+str ) + sys.stdout.write(now + str) if inc_newline: if display_screen: - sys.stdout.write( "\n" ) + sys.stdout.write("\n") if self.OutputFile: - self.OutputFile.write( "\n" ) + self.OutputFile.write("\n") if self.OutputFile: self.OutputFile.flush() - def write( self, str ): + def write(self, str): """ make log behave like a writable file object (for traceback prints) """ - self.LogEntry( str, 0, 1 ) + self.LogEntry(str, 0, 1) - def print_stack (self): + def print_stack(self): """ dump current stack in log """ - self.write ( traceback.format_exc() ) + self.write(traceback.format_exc()) # bm log uploading is available back again, as of nodeconfig-5.0-2 def Upload( self, extra_file=None ): diff --git a/source/steps/InstallInit.py b/source/steps/InstallInit.py index 3456343..db21464 100644 --- a/source/steps/InstallInit.py +++ b/source/steps/InstallInit.py @@ -16,7 +16,7 @@ def Run( vars, log ): """ Setup the install environment: - unmount anything in the temp/sysimg path (possible from previous - aborted installs + aborted installs) - create temp directories Expect the following variables from the store: -- 2.43.0