X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FConfirmInstallWithUser.py;h=1a18387c98f3327380db51b5ca3d4e649cd07566;hb=bca9d15033c15123b21196e9f24fac8c1b84675d;hp=7d2a6e345406cc91ffb1e2a1a9c4b24d77b5130a;hpb=ae73c450bffe036dccf37e8d96a4b655c3cd900e;p=bootmanager.git diff --git a/source/steps/ConfirmInstallWithUser.py b/source/steps/ConfirmInstallWithUser.py index 7d2a6e3..1a18387 100644 --- a/source/steps/ConfirmInstallWithUser.py +++ b/source/steps/ConfirmInstallWithUser.py @@ -1,11 +1,13 @@ -#!/usr/bin/python2 - +#!/usr/bin/python +# # 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= \ @@ -36,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. @@ -44,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