diff --git a/svg2mod/svg2mod.py b/svg2mod/svg2mod.py index cc3f060..91cc1ed 100755 --- a/svg2mod/svg2mod.py +++ b/svg2mod/svg2mod.py @@ -491,8 +491,11 @@ def _get_fill_stroke( self, item ): stroke = False elif name == "stroke-width": - value = value.replace( "px", "" ) - stroke_width = float( value ) * 25.4 / float(self.dpi) + if value.endswith("px"): + value = value.replace( "px", "" ) + stroke_width = float( value ) * 25.4 / float(self.dpi) + else: + stroke_width = float( value ) if not stroke: stroke_width = 0.0