Skip to content

Commit 1e8d185

Browse files
committed
tools: Add serial port arg for maintenance.py updateSystemPackage.py.
Signed-off-by: iabdalkader <[email protected]>
1 parent 530754d commit 1e8d185

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

toolkit/maintenance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ def main():
736736
parser.add_argument(
737737
"-opt", "--option", type=str, default="", help="call option [sesbanner]"
738738
)
739+
parser.add_argument("-p", "--port", type=str, help="Serial port device", required=True)
739740
parser.add_argument(
740741
"-V", "--version", help="Display Version Number", action="store_true"
741742
)
@@ -776,7 +777,7 @@ def main():
776777
print("Discover")
777778
isp.discoverSerialPorts()
778779

779-
errorCode = isp.openSerial()
780+
errorCode = isp.openSerial(args.port)
780781
if errorCode is False:
781782
print("[ERROR] isp openSerial failed for %s" % isp.getPort())
782783
sys.exit(EXIT_WITH_ERROR)

toolkit/updateSystemPackage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def main():
106106
help="run in non-authenticated mode",
107107
default=False,
108108
)
109+
parser.add_argument("-p", "--port", type=str, help="Serial port device", required=True)
109110
parser.add_argument(
110111
"-V", "--version", help="Display Version Number", action="store_true"
111112
)
@@ -147,7 +148,7 @@ def main():
147148
if args.discover: # discover the COM ports if requested
148149
isp.discoverSerialPorts()
149150

150-
errorCode = isp.openSerial()
151+
errorCode = isp.openSerial(args.port)
151152
if errorCode is False:
152153
print("[ERROR] isp openSerial failed for %s" % isp.getPort())
153154
sys.exit(EXIT_WITH_ERROR)

0 commit comments

Comments
 (0)