mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-23 19:31:55 +00:00
Print to stdout without --hint-tester, and print to output.txt with it.
This commit is contained in:
parent
a44222fc44
commit
4f53a3db15
12
britney.py
12
britney.py
@ -2390,7 +2390,6 @@ class Britney:
|
||||
"""
|
||||
|
||||
self.__log("Starting the upgrade test", type="I")
|
||||
self.__output = open(self.options.upgrade_output, 'w')
|
||||
self.output_write("Generated on: %s\n" % (time.strftime("%Y.%m.%d %H:%M:%S %z", time.gmtime(time.time()))))
|
||||
self.output_write("Arch order is: %s\n" % ", ".join(self.options.architectures))
|
||||
|
||||
@ -2475,7 +2474,6 @@ class Britney:
|
||||
# write HeidiResult
|
||||
self.write_heidi(self.options.heidi_output)
|
||||
|
||||
self.__output.close()
|
||||
self.__log("Test completed!", type="I")
|
||||
|
||||
def hint_tester(self):
|
||||
@ -2679,10 +2677,8 @@ class Britney:
|
||||
|
||||
def output_write(self, msg):
|
||||
"""Simple wrapper for output writing"""
|
||||
if self.options.hint_tester:
|
||||
print msg,
|
||||
else:
|
||||
self.__output.write(msg)
|
||||
print msg,
|
||||
self.__output.write(msg)
|
||||
|
||||
def main(self):
|
||||
"""Main method
|
||||
@ -2702,6 +2698,8 @@ class Britney:
|
||||
else:
|
||||
self.upgrade_me = self.options.actions.split()
|
||||
|
||||
self.__output = open(self.options.upgrade_output, 'w')
|
||||
|
||||
# run the hint tester
|
||||
if self.options.hint_tester:
|
||||
self.hint_tester()
|
||||
@ -2709,5 +2707,7 @@ class Britney:
|
||||
else:
|
||||
self.upgrade_testing()
|
||||
|
||||
self.__output.close()
|
||||
|
||||
if __name__ == '__main__':
|
||||
Britney().main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user