Daily commit

This commit is contained in:
Chiaki
2017-05-15 13:09:54 +08:00
parent 219facf185
commit bc6d80d745
3 changed files with 103 additions and 43 deletions

View File

@@ -49,7 +49,7 @@ def rand_str(length=32, type="lower_hex"):
def build_query_string(kv_data, ignore_none=True):
# {"a": 1, "b": "test"} -> "?a=1&b=test"
query_string = ""
for k, v in kv_data.iteritems():
for k, v in kv_data.items():
if ignore_none is True and kv_data[k] is None:
continue
if query_string != "":