X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=blobdiff_plain;f=bootauth.py;h=3ebe30b13f0b7b18056e52275a1b4825f4906078;hp=5c9dfa778356ddc1df8b5595fe5dd1fa36fb3a48;hb=48a73b18fd7daed13c645c1adeddb57b560e7a2d;hpb=7b8fc390afd0349706c45c3ae970770cdf9dceae diff --git a/bootauth.py b/bootauth.py index 5c9dfa7..3ebe30b 100755 --- a/bootauth.py +++ b/bootauth.py @@ -21,12 +21,12 @@ def main(): # Help def usage(): - print "Usage: %s [OPTION]..." % sys.argv[0] - print "Options:" - print " -f, --config=FILE PLC configuration file (default: /etc/planetlab/plc_config)" - print " -n, --node-id=FILE Node ID (or file)" - print " -k, --key=FILE Node key (or file)" - print " --help This message" + print("Usage: %s [OPTION]..." % sys.argv[0]) + print("Options:") + print(" -f, --config=FILE PLC configuration file (default: /etc/planetlab/plc_config)") + print(" -n, --node-id=FILE Node ID (or file)") + print(" -k, --key=FILE Node key (or file)") + print(" --help This message") sys.exit(1) # Get options @@ -36,8 +36,8 @@ def main(): "node=", "nodeid=", "node-id", "node_id", "key=", "help"]) - except getopt.GetoptError, err: - print "Error: " + err.msg + except getopt.GetoptError as err: + print("Error: " + err.msg) usage() for (opt, optval) in opts: @@ -72,7 +72,7 @@ def main(): plc = PLCAPI(config.plc_api_uri, config.cacert, session) assert session == plc.GetSession() - print session + print(session) if __name__ == '__main__': main()