Allow to comunicate with unicode.

This commit is contained in:
Jakub Skiepko 2014-06-14 13:18:42 +02:00
parent 935bdcf107
commit 4366296703
4 changed files with 27 additions and 12 deletions

View file

@ -1,6 +1,7 @@
import re
from routeros_api import exceptions
from routeros_api import utils
from routeros_api import query
@ -43,8 +44,8 @@ class ResponseSentence(object):
class CommandSentence(object):
def __init__(self, path, command, tag=None):
self.path = path
self.command = command
self.path = utils.get_bytes(path)
self.command = utils.get_bytes(command)
self.attributes = {}
self.api_attributes = {}
self.queries = set()
@ -61,7 +62,7 @@ class CommandSentence(object):
return formated
def set(self, key, value):
self.attributes[key] = value
self.attributes[utils.get_bytes(key)] = utils.get_bytes(value)
def filter(self, *args, **kwargs):
for arg in args: