[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:
parent
385dfc4921
commit
e0fdf45ad0
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user