mirror of
https://github.com/naruxde/revpimodio2.git
synced 2025-11-08 22:03:53 +01:00
Bugfix for offset check in piCtory file
This commit is contained in:
@@ -161,12 +161,13 @@ class Device(object):
|
|||||||
self._producttype = int(dict_device.get("productType"))
|
self._producttype = int(dict_device.get("productType"))
|
||||||
|
|
||||||
# Offset-Check for broken piCtory configuration
|
# Offset-Check for broken piCtory configuration
|
||||||
if self._offset != parentmodio.length:
|
if self._offset < parentmodio.length:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"Device offset ERROR in piCtory configuration! Offset of '{0}' "
|
"Device offset ERROR in piCtory configuration! Offset of '{0}' "
|
||||||
"must be {1} but is {2} - Overlapping devices overwrite the "
|
"must be {1} but is {2} - Overlapping devices overwrite the "
|
||||||
"same memory, which has unpredictable effects!!!"
|
"same memory, which has unpredictable effects!!!"
|
||||||
"".format(self._name, parentmodio.length, self._offset)
|
"".format(self._name, parentmodio.length, self._offset),
|
||||||
|
Warning
|
||||||
)
|
)
|
||||||
# IOM-Objekte erstellen und Adressen in SLCs speichern
|
# IOM-Objekte erstellen und Adressen in SLCs speichern
|
||||||
if simulator:
|
if simulator:
|
||||||
|
|||||||
@@ -968,7 +968,7 @@ class RevPiNetIOSelected(RevPiNetIO):
|
|||||||
|
|
||||||
for vdev in self._lst_devselect:
|
for vdev in self._lst_devselect:
|
||||||
if type(vdev) != int and type(vdev) != str:
|
if type(vdev) != int and type(vdev) != str:
|
||||||
raise TypeError(
|
raise ValueError(
|
||||||
"need device position as <class 'int'> or device name as "
|
"need device position as <class 'int'> or device name as "
|
||||||
"<class 'str'>"
|
"<class 'str'>"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user