def get_usrs(): print("get_usrs()") try: rc, usrs = db.get_usrs(conn) if (rc != db.rc_ok): print("Error: Failed to execute - db.get_usrs") exit(1) except Exception as ex: print("Error - get_usrs: {0}".format(ex)) exit(1) ret_json = {"Status": "Ok", "Result": usrs} print(ret_json) return ret_json, rc_ok
print(cfg) rc, conn = db.open_conn() if (rc != db.rc_ok): print("Error: Failed to execute function - db.open_conn") # Init table: users rc = db.del_usrs(conn) if (rc != db.rc_ok): print("Error: Failed to execute function - db.del_usrs") print() rc, usrs = db.get_usrs(conn) if (rc != db.rc_ok): print("Error: Failed to execute function - db.get_usrs") print_usrs(usrs) print() # Init table: config rc = db.del_cfgs(conn) if (rc != db.rc_ok): print("Error: Failed to execute function - db.del_cfgs") print() url_cfg = "http://127.0.0.1:30001/users/get_user_data/1"