Skip to content
Snippets Groups Projects
Commit 175a73a8 authored by al.schwinn's avatar al.schwinn
Browse files

Bug 1412 - Refactor Codegen - Introduce class "Block"

parent a3ecf8c3
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python
# Copyright 2016 CERN and GSI
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import libxml2
import iecommon
def getFesaName(node):
if(node.hasProp('fesaPropertyName')):
return node.prop('fesaPropertyName')
if(node.hasProp('fesaFieldName')):
return node.prop('fesaFieldName')
if(node.hasProp('name')):
return node.prop('name')
iecommon.logError('ERROR: Passed node has no name attribute', True, {'errorlog': True})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment