|
21 | 21 |
|
22 | 22 | class RebootCountResetter: |
23 | 23 | def __init__(self, args: argparse.Namespace): |
24 | | - self.app_id = args.app |
| 24 | + self.app_ids = args.app |
25 | 25 | self.count = args.count |
26 | 26 | self.client = LocalClient(default_multicast_address(), 1.0) |
27 | 27 | self.decoder = TDF() |
@@ -49,7 +49,7 @@ def state_update(self, live: Live, state: str): |
49 | 49 | live.update(self.progress_table()) |
50 | 50 |
|
51 | 51 | def announce_observed(self, live: Live, infuse_id: int, pkt: readings.announce | readings.announce_v2): |
52 | | - if pkt.application != self.app_id: |
| 52 | + if pkt.application not in self.app_ids: |
53 | 53 | return |
54 | 54 | if pkt.reboots == self.count: |
55 | 55 | if (infuse_id not in self.already) and (infuse_id not in self.updated): |
@@ -87,7 +87,7 @@ def run(self): |
87 | 87 | if __name__ == "__main__": |
88 | 88 | parser = argparse.ArgumentParser("Reset reboot counters to a common value") |
89 | 89 | addr_group = parser.add_mutually_exclusive_group(required=True) |
90 | | - addr_group.add_argument("--app", type=lambda x: int(x, 0), help="Application ID to reset") |
| 90 | + addr_group.add_argument("--app", type=lambda x: int(x, 0), action="append", help="Application ID to reset") |
91 | 91 | parser.add_argument("--count", type=int, default=0, help="Value to reset count to") |
92 | 92 |
|
93 | 93 | args = parser.parse_args() |
|
0 commit comments