X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FConfirmInstallWithUser.py;h=1a18387c98f3327380db51b5ca3d4e649cd07566;hb=bca9d15033c15123b21196e9f24fac8c1b84675d;hp=b089e00eed8e2606f657e5734c0a330df9ec970a;hpb=1136f7d3b68de92034e188e30863a565d738ea52;p=bootmanager.git diff --git a/source/steps/ConfirmInstallWithUser.py b/source/steps/ConfirmInstallWithUser.py index b089e00..1a18387 100644 --- a/source/steps/ConfirmInstallWithUser.py +++ b/source/steps/ConfirmInstallWithUser.py @@ -1,14 +1,13 @@ #!/usr/bin/python # -# $Id$ -# $URL$ -# # Copyright (c) 2003 Intel Corporation # All rights reserved. # # Copyright (c) 2004-2006 The Trustees of Princeton University # All rights reserved. +from __future__ import print_function + from Exceptions import * welcome_message= \ @@ -39,7 +38,7 @@ WARNING : Installing PlanetLab will remove any existing operating system and """ -def Run( vars, log ): +def Run(vars, log): """ Ask the user if we really want to wipe this machine. @@ -47,25 +46,25 @@ def Run( vars, log ): a BootManagerException if anything unexpected occurred. """ - log.write( "\n\nStep: Confirming install with user.\n" ) + log.write("\n\nStep: Confirming install with user.\n") try: - confirmation= "" - install= 0 - print welcome_message + confirmation = "" + install = 0 + print(welcome_message) while confirmation not in ("yes","no"): - confirmation= \ - raw_input("Are you sure you wish to continue (yes/no):") - install= confirmation=="yes" - except EOFError, e: + confirmation = \ + raw_input("Are you sure you wish to continue (yes/no): ") + install = confirmation=="yes" + except EOFError as e: pass - except KeyboardInterrupt, e: + except KeyboardInterrupt as e: pass if install: - log.write( "\nUser accepted install.\n" ) + log.write("\nUser accepted install.\n") else: - log.write( "\nUser canceled install.\n" ) + log.write("\nUser canceled install.\n") return install