xaal.lib 0.7.4__tar.gz → 0.7.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/PKG-INFO +1 -1
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/pyproject.toml +1 -1
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/messages.py +3 -3
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/tools.py +3 -4
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal.lib.egg-info/PKG-INFO +1 -1
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/README.rst +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/setup.cfg +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/tests/test_bindings.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/tests/test_cbor.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/tests/test_device.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/tests/test_engine.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/tests/test_message.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/tests/test_tools.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/__init__.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/__init__.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/__main__.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/aioengine.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/aiohelpers.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/aionetwork.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/bindings.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/cbor.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/config.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/core.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/devices.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/engine.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/exceptions.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/helpers.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/network.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal/lib/test.py +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal.lib.egg-info/SOURCES.txt +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal.lib.egg-info/dependency_links.txt +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal.lib.egg-info/requires.txt +0 -0
- {xaal_lib-0.7.4 → xaal_lib-0.7.6}/xaal.lib.egg-info/top_level.txt +0 -0
|
@@ -210,7 +210,7 @@ class MessageFactory(object):
|
|
|
210
210
|
class MessageType(Enum):
|
|
211
211
|
NOTIFY = 0
|
|
212
212
|
REQUEST = 1
|
|
213
|
-
REPLY = 2
|
|
213
|
+
REPLY = 2
|
|
214
214
|
|
|
215
215
|
|
|
216
216
|
class MessageAction(Enum):
|
|
@@ -323,8 +323,8 @@ def build_nonce(data):
|
|
|
323
323
|
|
|
324
324
|
def build_timestamp():
|
|
325
325
|
"""Return array [seconds since epoch, microseconds since last seconds] Time = UTC+0000"""
|
|
326
|
-
epoch = datetime.datetime.
|
|
327
|
-
timestamp = datetime.datetime.
|
|
326
|
+
epoch = datetime.datetime.fromtimestamp(0, datetime.UTC)
|
|
327
|
+
timestamp = datetime.datetime.now(datetime.UTC) - epoch
|
|
328
328
|
return _packtimestamp(timestamp.total_seconds(), timestamp.microseconds)
|
|
329
329
|
|
|
330
330
|
|
|
@@ -30,7 +30,7 @@ from configobj import ConfigObj
|
|
|
30
30
|
from . import config
|
|
31
31
|
from .bindings import UUID
|
|
32
32
|
|
|
33
|
-
XAAL_DEVTYPE_PATTERN = '^[a-zA-Z][a-zA-Z0-9_-]
|
|
33
|
+
XAAL_DEVTYPE_PATTERN = '^[a-zA-Z][a-zA-Z0-9_-]*\\.[a-zA-Z][a-zA-Z0-9_-]*$'
|
|
34
34
|
|
|
35
35
|
def get_cfg_filename(name, cfg_dir=config.conf_dir):
|
|
36
36
|
if name.startswith('xaal.'):
|
|
@@ -39,7 +39,7 @@ def get_cfg_filename(name, cfg_dir=config.conf_dir):
|
|
|
39
39
|
if not os.path.isdir(cfg_dir):
|
|
40
40
|
print("Your configuration directory doesn't exist: [%s]" % cfg_dir)
|
|
41
41
|
return os.path.join(cfg_dir, filename)
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
def load_cfg_file(filename):
|
|
44
44
|
""" load .ini file and return it as dict"""
|
|
45
45
|
if os.path.isfile(filename):
|
|
@@ -112,7 +112,7 @@ def pass2key(passphrase):
|
|
|
112
112
|
memlimit: crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE
|
|
113
113
|
"""
|
|
114
114
|
buf = passphrase.encode('utf-8')
|
|
115
|
-
KEY_BYTES = pysodium.crypto_pwhash_scryptsalsa208sha256_SALTBYTES #32
|
|
115
|
+
KEY_BYTES = pysodium.crypto_pwhash_scryptsalsa208sha256_SALTBYTES #32
|
|
116
116
|
# this should be:
|
|
117
117
|
# salt = bytes(KEY_BYTES)
|
|
118
118
|
# but due to bytes() stupid stuff in py2 we need this awfull stuff
|
|
@@ -127,4 +127,3 @@ def reduce_addr(addr):
|
|
|
127
127
|
"""return a string based addred without all digits"""
|
|
128
128
|
tmp = addr.str
|
|
129
129
|
return tmp[:5] + '..' + tmp[-5:]
|
|
130
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|