git://git.onelab.eu
/
nodemanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set default vref to f24 + minor tweaks
[nodemanager.git]
/
bootauth.py
diff --git
a/bootauth.py
b/bootauth.py
index
bf845d6
..
5c9dfa7
100755
(executable)
--- a/
bootauth.py
+++ b/
bootauth.py
@@
-1,13
+1,11
@@
#!/usr/bin/python
#
#!/usr/bin/python
#
-#
Test script for o
btaining a node session key. Usually, the Boot
-# Manager obtains it, then writes it to /etc/planetlab/session.
+#
O
btaining a node session key. Usually, the Boot
+# Manager obtains it, then writes it to /etc/planetlab/session.
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-#
import os, sys
import getopt
import os, sys
import getopt
@@
-47,12
+45,14
@@
def main():
config = Config(optval)
elif opt == "-n" or opt == "--node" or opt == "--nodeid" or opt == "--node-id" or opt == "--node_id":
if os.path.exists(optval):
config = Config(optval)
elif opt == "-n" or opt == "--node" or opt == "--nodeid" or opt == "--node-id" or opt == "--node_id":
if os.path.exists(optval):
- node_id = file(optval).read().strip()
+ with open(optval) as optfile:
+ node_id = optfile.read().strip()
else:
node_id = int(optval)
elif opt == "-k" or opt == "--key":
if os.path.exists(optval):
else:
node_id = int(optval)
elif opt == "-k" or opt == "--key":
if os.path.exists(optval):
- key = file(optval).read().strip()
+ with open(optval) as optfile:
+ key = optfile.read().strip()
else:
key = optval
else:
else:
key = optval
else: