forked from anduril/jetpack-nixos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
board-automation.patch
34 lines (30 loc) · 1.76 KB
/
board-automation.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff --git a/tools/board_automation/boardctl b/tools/board_automation/boardctl
index e69cd5b..5ac1f7c 100755
--- a/tools/board_automation/boardctl
+++ b/tools/board_automation/boardctl
@@ -1,4 +1,4 @@
-#! /usr/bin/env python2
+#! /usr/bin/env python3
# Copyright (c) 2013-2016, NVIDIA CORPORATION. All Rights Reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
@@ -40,7 +40,7 @@ if __name__ == "__main__":
if options.serial is None and "PMXXX_SERIAL" in os.environ:
options.serial = os.environ["PMXXX_SERIAL"]
- print >>sys.stderr, "NOTE: Using --serial=%s from environment." % options.serial
+ print(f"NOTE: Using --serial={options.serial} from environment.", file=sys.stderr)
if options.target in pm342_targets:
from pm342 import pm342
@@ -60,7 +60,7 @@ if __name__ == "__main__":
exit(1)
if len(args) != 1:
- print >>sys.stderr, "Must give a board control command: reset | recovery | usb_{on,off} | recovery_{up,down} | onkey | onkey_{up,down} | power_{on,off} | status"
+ print("Must give a board control command: reset | recovery | usb_{on,off} | recovery_{up,down} | onkey | onkey_{up,down} | power_{on,off} | status", file=sys.stderr)
sys.exit(1)
if args[0] == "reset":
@@ -91,4 +91,4 @@ if __name__ == "__main__":
for gpio in sorted([x for x in pmxxx.get_IO_names() if "GPIO" in x]):
print(gpio + " is %d" % pmxxx.get_IO(gpio))
else:
- print >>sys.stderr, "Must give a board control command: reset | recovery | usb_{on,off} | recovery_{up,down} | onkey | power_{on,off} | status"
+ print("Must give a board control command: reset | recovery | usb_{on,off} | recovery_{up,down} | onkey | power_{on,off} | status", file=sys.stderr)