commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 05/08: grc: ignore xml comments in block wr


From: git
Subject: [Commit-gnuradio] [gnuradio] 05/08: grc: ignore xml comments in block wrappers
Date: Tue, 5 Apr 2016 23:29:12 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit 686288a6947c3c24d4410f2abd259a7bde22e053
Author: Sebastian Koslowski <address@hidden>
Date:   Tue Apr 5 15:41:54 2016 +0200

    grc: ignore xml comments in block wrappers
    
    this fixes #26 on github:
    xml comments where not parsed as such and seeped into the internal 
representation of
    the block wrappers. now they are ignored
---
 grc/base/ParseXML.py | 1 +
 grc/base/Port.py     | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/grc/base/ParseXML.py b/grc/base/ParseXML.py
index 2d5fed0..e05fc14 100644
--- a/grc/base/ParseXML.py
+++ b/grc/base/ParseXML.py
@@ -21,6 +21,7 @@ from lxml import etree
 from . import odict
 
 xml_failures = {}
+etree.set_default_parser(etree.XMLParser(remove_comments=True))
 
 
 class XMLSyntaxError(Exception):
diff --git a/grc/base/Port.py b/grc/base/Port.py
index 39166d1..d1c3516 100644
--- a/grc/base/Port.py
+++ b/grc/base/Port.py
@@ -36,7 +36,7 @@ class Port(Element):
         #grab the data
         self._name = n['name']
         self._key = n['key']
-        self._type = n['type']
+        self._type = n['type'] or ''
         self._domain = n['domain']
         self._hide = n.find('hide') or ''
         self._dir = dir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]