LarsVoelker / FibexConverter

Convert SOME/IP config in FIBEX 4 to different configuration formats (e.g. Wireshark).
GNU General Public License v2.0
64 stars 21 forks source link

dependency `isodate` really needed? #5

Closed matawed closed 1 year ago

matawed commented 1 year ago

I was wondering whether non-standard library dependency isodate is really needed by running

python3 configuration_to_text.py FIBEX example-file.xml

and

python3 configuration_to_wireshark_config.py FIBEX example-file.xml

for one example fibex file with the following patch:

diff --git a/abstract_parser.py b/abstract_parser.py
index 73a2d93..82bd564 100644
--- a/abstract_parser.py
+++ b/abstract_parser.py
@@ -19,7 +19,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

-import isodate
+#import isodate

 class AbstractParser(object):
@@ -99,4 +99,4 @@ class AbstractParser(object):
         s = self.get_child_text(element, childtag)
         if s is None:
             return -1
-        return (isodate.parse_duration(s)).total_seconds()
+        raise NotImplementedError

and it worked without issues.

So the question is whether we can get rid of this dependency?

LarsVoelker commented 1 year ago

This is already a preparation for an upcoming release, so I would like to keep it.