socialwifi.RouterOS-api/routeros_api/utils.py
2014-06-14 14:46:45 +02:00

5 lines
120 B
Python

def get_bytes(string):
if hasattr(string, 'encode'):
return string.encode()
else:
return string