Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
836defc216 | ||
|
|
f8f777b5b5 |
@@ -190,22 +190,23 @@ class MinerData:
|
||||
tags = ["ip", "mac", "model", "hostname"]
|
||||
for attribute in self:
|
||||
if attribute in tags:
|
||||
tag_data.append(f'"{attribute}"="{self[attribute]}"')
|
||||
escaped_data = self[attribute].replace(" ", "\\ ")
|
||||
tag_data.append(f"{attribute}={escaped_data}")
|
||||
continue
|
||||
if isinstance(self[attribute], str):
|
||||
field_data.append(f'"{attribute}"="{self[attribute]}"')
|
||||
field_data.append(f'{attribute}="{self[attribute]}"')
|
||||
continue
|
||||
if isinstance(self[attribute], bool):
|
||||
field_data.append(f'"{attribute}"={str(self[attribute]).lower()}')
|
||||
field_data.append(f"{attribute}={str(self[attribute]).lower()}")
|
||||
continue
|
||||
if isinstance(self[attribute], int):
|
||||
field_data.append(f'"{attribute}"={self[attribute]}i')
|
||||
field_data.append(f"{attribute}={self[attribute]}i")
|
||||
continue
|
||||
if isinstance(self[attribute], float):
|
||||
field_data.append(f'"{attribute}"={self[attribute]}')
|
||||
field_data.append(f"{attribute}={self[attribute]}")
|
||||
continue
|
||||
if attribute == "fault_light" and not self[attribute]:
|
||||
field_data.append(f'"{attribute}"=false')
|
||||
field_data.append(f"{attribute}=false")
|
||||
continue
|
||||
|
||||
tags_str = ",".join(tag_data)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "pyasic"
|
||||
version = "0.16.5"
|
||||
version = "0.16.6"
|
||||
description = "A set of modules for interfacing with many common types of ASIC bitcoin miners, using both their API and SSH."
|
||||
authors = ["UpstreamData <brett@upstreamdata.ca>"]
|
||||
repository = "https://github.com/UpstreamData/pyasic"
|
||||
|
||||
Reference in New Issue
Block a user