dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #22866
minor improvement in meshconvert.py: dolfin-kassbohm-2011-04-28.patch
Hello,
this is only minor bug-fix in the file meshconvert.py.
When reading in empty lines as part of an Abaqus input file,
meshconvert exits with a misleading error message. After using the
patch, it will exit with a more helpful error message.
Regards,
S.K.
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: kassbohm@xxxxxxxxx-20110428222212-3672ple6rvety7oc
# target_branch: http://bazaar.launchpad.net/~dolfin-core/dolfin/main/
# testament_sha1: 67a0c89be322c4e650aa5e6025acd085b575d59b
# timestamp: 2011-04-28 18:44:55 -0400
# base_revision_id: gnw20@xxxxxxxxx-20110425074452-vuijj5xih1twoy81
#
# Begin patch
=== modified file 'site-packages/dolfin_utils/meshconvert.py'
--- site-packages/dolfin_utils/meshconvert.py 2011-04-18 21:00:18 +0000
+++ site-packages/dolfin_utils/meshconvert.py 2011-04-28 22:22:12 +0000
@@ -949,6 +949,10 @@
for lineno, l in enumerate(ifile):
l = l.strip().lower()
m = re_sect.match(l)
+ # prevent misleading error message, if empty line is parsed:
+ if l=='':
+ handler.error("Empty line (line %d) currently not supported." % (lineno+1,))
+
if m is not None:
sect, params_str = m.groups()
params_spec = ([s.strip() for s in params_str.split(",")] if params_str
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWc6yGMUAAZRfgERQWu//91IA
AAC////wUAODN2ad66M9eKEoiNEHoTFPU8J6k2pp5EjaNNJpmkDSIyJjIDKB6g0DQNAGgBJIAQCF
PNQYoaaNHqPUBoAMSpo2k9QB6QBoAAAAASSUwTyTU9HqnoJ5RoabTSZNAAaUiRg22BJ0yLLnXQIi
+vbpAkgx0NLY5wSVqVcZVsbPuUVenofMUoK17Bvv/Pab19p4+3X8z6uliPqXZXE1kWTCNT9eVMvh
Xac0XzYhnuGedDU33d1mffRebraiGCKJYI/434c/Cs0adrrLzA032XcuGF0oQFuZvK7FzgT8cY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