Compare commits

..
3 Commits
Author SHA1 Message Date
Nigel feb0f88ddc Preparing release 0.26 2020-12-15 15:03:22 +01:00
Nigel 602129a665 Merge pull request #68 from ndokter/revert-57-master
Revert "fix for empty parentheses in ProfileGenericParser"
2020-12-15 15:00:07 +01:00
Nigel af9a99d995 Revert "fix for empty parentheses in ProfileGenericParser" 2020-12-15 14:59:35 +01:00
3 changed files with 4 additions and 10 deletions
+3
View File
@@ -1,6 +1,9 @@
Change Log
----------
**0.26** (2020-12-15)
- reverted fix for empty parentheses in ProfileGenericParser (`pull request #68 <https://github.com/ndokter/dsmr_parser/pull/68>`_).
**0.25** (2020-12-14)
- fix for empty parentheses in ProfileGenericParser (`pull request #57 <https://github.com/ndokter/dsmr_parser/pull/57>`_).
-9
View File
@@ -225,11 +225,6 @@ class ProfileGenericParser(DSMRObjectParser):
self.parsers_for_unidentified = parsers_for_unidentified
def _is_line_wellformed(self, line, values):
# allow empty parentheses (indicated by empty string)
if values and (len(values) == 1) and (values[0] == ''):
return True
if values and (len(values) >= 2) and (values[0].isdigit()):
buffer_length = int(values[0])
return (buffer_length <= 10) and (len(values) == (buffer_length * 2 + 2))
@@ -237,10 +232,6 @@ class ProfileGenericParser(DSMRObjectParser):
return False
def _parse_values(self, values):
# in case of empty parentheses return
if values and (len(values) == 1) and (values[0] == None):
return super()._parse_values(values) #calling parent
buffer_length = int(values[0])
buffer_value_obis_ID = values[1]
if (buffer_length > 0):
+1 -1
View File
@@ -6,7 +6,7 @@ setup(
author='Nigel Dokter',
author_email='nigel@nldr.net',
url='https://github.com/ndokter/dsmr_parser',
version='0.25',
version='0.26',
packages=find_packages(exclude=('test', 'test.*')),
install_requires=[
'pyserial>=3,<4',