mirror of
https://github.com/mbirth/tcl_ota_check.git
synced 2024-11-09 22:06:47 +00:00
add db updater script
This commit is contained in:
parent
eef0f755e3
commit
c29d32d39f
22
tclupdatedb.py
Normal file
22
tclupdatedb.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# pylint: disable=C0111,C0326,C0103
|
||||||
|
|
||||||
|
"""Update PRD database."""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from tcllib import argparser, devlist
|
||||||
|
|
||||||
|
|
||||||
|
dpdesc = """
|
||||||
|
Updates PRD software database if local copy is outdated.
|
||||||
|
"""
|
||||||
|
dp = argparser.DefaultParser(__file__, dpdesc)
|
||||||
|
dp.add_argument("-f", "--force", help="force database update", dest="force", action="store_true", default=False)
|
||||||
|
args = dp.parse_args(sys.argv[1:])
|
||||||
|
|
||||||
|
print("Updating device database...")
|
||||||
|
prds = devlist.get_devicelist(force=args.force)
|
||||||
|
del prds
|
Loading…
Reference in New Issue
Block a user