Fixes report bug on python 3

This commit is contained in:
hackrush 2018-09-22 01:58:24 +05:30 committed by Lex Berezhny
parent bcf52c3f24
commit 04e0933d36

View file

@ -3385,7 +3385,7 @@ class Daemon(AuthJSONRPCServer):
def loggly_time_string(dt):
formatted_dt = dt.strftime("%Y-%m-%dT%H:%M:%S")
milliseconds = str(round(dt.microsecond * (10.0 ** -5), 3))
return urllib.quote_plus(formatted_dt + milliseconds + "Z")
return urllib.parse.quote(formatted_dt + milliseconds + "Z")
def get_loggly_query_string(installation_id):
@ -3397,7 +3397,7 @@ def get_loggly_query_string(installation_id):
'from': loggly_time_string(yesterday),
'to': loggly_time_string(now)
}
data = urllib.urlencode(params)
data = urllib.parse.urlencode(params)
return base_loggly_search_url + data