Skip to content

Commit a7c6cc5

Browse files
committed
Added missing function
1 parent c180bd5 commit a7c6cc5

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "PyVantagePro_MarcoGos"
7-
version = "0.3.25"
7+
version = "0.3.26"
88
authors = [
99
{ name="Salem Harrache", email="[email protected]" },
1010
{ name="Marco Gosselink", email="[email protected]" },

pyvantagepro/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
from .logger import LOGGER, active_logger
1414
from .device import VantagePro2
1515

16-
VERSION = '0.3.25'
16+
VERSION = '0.3.26'
1717
__version__ = VERSION

pyvantagepro/compat.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,11 @@ def to_char(string):
9090
bytes = bytes
9191
stdout = sys.stdout.buffer
9292
xrange = range
93+
94+
95+
def format_string(s, encoding='utf-8'):
96+
if isinstance(s, str):
97+
return s.encode(encoding)
98+
if isinstance(s, basestring):
99+
return s
100+
return str(s)

0 commit comments

Comments
 (0)