Skip to content

Commit

Permalink
Update multipart.py make_payloads
Browse files Browse the repository at this point in the history
Fix assertion error when invoking make_payloads with float instance.
  • Loading branch information
SpirosStyliaras authored Sep 26, 2023
1 parent fec3b50 commit 5118107
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions maas/client/utils/multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def make_payloads(name, content):
yield make_bytes_payload(name, b"false")
elif isinstance(content, int):
yield make_bytes_payload(name, b"%d" % content)
elif isinstance(content, float):
yield make_bytes_payload(name, b"%f" % content)
elif isinstance(content, bytes):
yield make_bytes_payload(name, content)
elif isinstance(content, str):
Expand Down

0 comments on commit 5118107

Please sign in to comment.