Skip to content

Commit 4fee105

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

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Diff for: toolkit/maintenance.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,9 @@ def main():
736736
parser.add_argument(
737737
"-opt", "--option", type=str, default="", help="call option [sesbanner]"
738738
)
739+
parser.add_argument(
740+
"-p", "--port", type=str, help="Serial port device", required=True
741+
)
739742
parser.add_argument(
740743
"-V", "--version", help="Display Version Number", action="store_true"
741744
)
@@ -776,7 +779,7 @@ def main():
776779
print("Discover")
777780
isp.discoverSerialPorts()
778781

779-
errorCode = isp.openSerial()
782+
errorCode = isp.openSerial(args.port)
780783
if errorCode is False:
781784
print("[ERROR] isp openSerial failed for %s" % isp.getPort())
782785
sys.exit(EXIT_WITH_ERROR)

Diff for: toolkit/updateSystemPackage.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ def main():
106106
help="run in non-authenticated mode",
107107
default=False,
108108
)
109+
parser.add_argument(
110+
"-p", "--port", type=str, help="Serial port device", required=True
111+
)
109112
parser.add_argument(
110113
"-V", "--version", help="Display Version Number", action="store_true"
111114
)
@@ -147,7 +150,7 @@ def main():
147150
if args.discover: # discover the COM ports if requested
148151
isp.discoverSerialPorts()
149152

150-
errorCode = isp.openSerial()
153+
errorCode = isp.openSerial(args.port)
151154
if errorCode is False:
152155
print("[ERROR] isp openSerial failed for %s" % isp.getPort())
153156
sys.exit(EXIT_WITH_ERROR)

0 commit comments

Comments
 (0)