From af9a99d995c70575e66f18ec96288aed47b30735 Mon Sep 17 00:00:00 2001 From: Nigel Dokter Date: Tue, 15 Dec 2020 14:59:35 +0100 Subject: [PATCH] Revert "fix for empty parentheses in ProfileGenericParser" --- dsmr_parser/parsers.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/dsmr_parser/parsers.py b/dsmr_parser/parsers.py index e8cc704..8528ec8 100644 --- a/dsmr_parser/parsers.py +++ b/dsmr_parser/parsers.py @@ -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):