[update_chassisdb_config] Convert to Python 3 (#5838)

- Convert update_chassisdb_config script to Python 3
- Reorganize imports per PEP8 standard
- Two blank lines precede functions per PEP8 standard
This commit is contained in:
Joe LeVeque 2020-11-09 08:35:36 -08:00 committed by GitHub
parent 385dfc4921
commit e0fdf45ad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,15 @@
#!/usr/bin/python
#!/usr/bin/python3
import argparse
import json
import os
import syslog
import argparse
database_config_file = "/var/run/redis/sonic-db/database_config.json"
redis_chassis = 'redis_chassis'
chassis_db = 'CHASSIS_APP_DB'
def main():
parser = argparse.ArgumentParser(description=
"Update chassis_db config from database-config.json")
@ -63,5 +65,6 @@ def main():
syslog.syslog(syslog.LOG_INFO,
'remove chassis_db from config file {}'.format(jsonfile))
if __name__ == "__main__":
main()