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
|
Reference in New Issue
Block a user