diff Generic/fiebdc.py @ 20:f5ec50b625d1

Prevent subfield units remains empty
author Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es>
date Thu, 11 Sep 2014 19:03:07 +0200
parents bea86fd8dfc6
children f7e0cc58737f
line wrap: on
line diff
--- a/Generic/fiebdc.py	Wed Sep 03 12:14:04 2014 +0200
+++ b/Generic/fiebdc.py	Thu Sep 11 19:03:07 2014 +0200
@@ -1142,6 +1142,10 @@
                 print utils.mapping(_("The measure values are not float "\
                       "numbers, code $1"), (_codes.encode("utf8"),))
                 return
+            # Prevent subfield units remains empty.
+            if (_units == u"" and (_length != u"" or _width != u""
+                                   or _height != u"")):
+                _units = 1.0
             _line_list.append([_linetype, _comment, _units,
                                _length, _width, _height, _formula])
             _line_index = _line_index + 6