PyVLCB 0.2.1__tar.gz → 0.2.2__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.
- {pyvlcb-0.2.1/src/PyVLCB.egg-info → pyvlcb-0.2.2}/PKG-INFO +1 -1
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/pyproject.toml +1 -1
- {pyvlcb-0.2.1 → pyvlcb-0.2.2/src/PyVLCB.egg-info}/PKG-INFO +1 -1
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/pyvlcb/vlcbformat.py +6 -5
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/LICENSE +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/README.md +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/setup.cfg +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/PyVLCB.egg-info/SOURCES.txt +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/PyVLCB.egg-info/dependency_links.txt +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/PyVLCB.egg-info/requires.txt +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/PyVLCB.egg-info/top_level.txt +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/pyvlcb/__init__.py +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/pyvlcb/canusb.py +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/pyvlcb/exceptions.py +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/pyvlcb/tests/run_tests.py +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/pyvlcb/tests/test_canusb4.py +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/pyvlcb/tests/test_vlcb.py +0 -0
- {pyvlcb-0.2.1 → pyvlcb-0.2.2}/src/pyvlcb/utils.py +0 -0
|
@@ -463,14 +463,15 @@ class VLCBOpcode:
|
|
|
463
463
|
|
|
464
464
|
Returns:
|
|
465
465
|
String: shortened opcode string
|
|
466
|
+
or empty string for NULL opcode
|
|
466
467
|
|
|
467
|
-
Raises:
|
|
468
|
-
ValueError: If string does not contain at least 2 characters
|
|
469
468
|
"""
|
|
470
|
-
|
|
469
|
+
# Also ignore - in position 1 (eg. " - ")
|
|
470
|
+
if len(opcode_string) >= 2 and opcode_string[1] != "-":
|
|
471
471
|
return opcode_string[0:2]
|
|
472
472
|
else:
|
|
473
|
-
|
|
473
|
+
# If not a opcode_string (eg. Null) return ""
|
|
474
|
+
return ""
|
|
474
475
|
|
|
475
476
|
# Get min priority from opcode
|
|
476
477
|
@staticmethod
|
|
@@ -484,7 +485,7 @@ class VLCBOpcode:
|
|
|
484
485
|
ValueError: If opcode not found
|
|
485
486
|
"""
|
|
486
487
|
opcode = VLCBOpcode.opcode_extract(opcode)
|
|
487
|
-
if opcode in VLCBOpcode.opcodes
|
|
488
|
+
if opcode in VLCBOpcode.opcodes:
|
|
488
489
|
return VLCBOpcode.opcodes[opcode]['minpri']
|
|
489
490
|
else:
|
|
490
491
|
raise ValueError(f"Opcode {opcode} is not defined.")
|
|
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
|