Fix status code not print bug

This commit is contained in:
Jeremy Zhang 2020-02-17 18:10:24 -08:00
parent 51ff9b48b6
commit 9f154b25d6

View File

@ -13,7 +13,7 @@ def print_shards():
if r.status_code >= 200 and r.status_code < 300: if r.status_code >= 200 and r.status_code < 300:
print("Suggested number of shards: {}".format(r.json().get("shards", 0))) print("Suggested number of shards: {}".format(r.json().get("shards", 0)))
else: else:
print("Status Code: " + r.status_code) print("Status Code: {}".format(r.status_code))
print(r.text) print(r.text)
def main(): def main():