1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-09-19 22:33:25 +01:00

add db updater script

This commit is contained in:
thurask 2018-02-13 14:18:21 -05:00
parent eef0f755e3
commit c29d32d39f
No known key found for this signature in database
GPG Key ID: A6CCCDEA29795048

22
tclupdatedb.py Normal file
View 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