Github Mirror / telegraf-plugins: c55191e6




Bugfix: Switch signstr to using literal newlines

Bugfix: Switch signstr to using literal newlines

They did want full newlines after all.

First successful call to the API has been made (utilities/telegraf-plugins#9)

Commit c55191e6.

Authored 2023-05-15T09:01:15.000+01:00 by B Tasker in project Github Mirror / telegraf-plugins

+2 lines -3 lines

Commit Signature

Changes

diff --git a/soliscloud/soliscloud.py b/soliscloud/soliscloud.py
--- a/soliscloud/soliscloud.py
+++ b/soliscloud/soliscloud.py
# @@ -156,9 +156,8 @@ class SolisCloud:
# datestring = d.strftime('%a, %d %b %Y %H:%M:%S GMT')
#
# # Construct the string that we need to sign
# - # The entries should be seperated by \n - the API doesn't want
# - # literal newlines (presumably it evaluates them on read)
# - signstr = '\\n'.join([method,
# + # The entries should be seperated by a newline
# + signstr = '\n'.join([method,
# md5_str,
# content_type,
# datestring,
#