From 3452126400c596ff0f7ca2bf585364a6792f98fc Mon Sep 17 00:00:00 2001
From: Bastian Bloessl <mail@bastibl.net>
Date: Fri, 22 Feb 2019 11:17:05 +0000
Subject: modtool: converter, support mod names w/ underscores

---
 gr-utils/python/modtool/core/update.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'gr-utils/python')

diff --git a/gr-utils/python/modtool/core/update.py b/gr-utils/python/modtool/core/update.py
index ec8a519d45..c715426638 100644
--- a/gr-utils/python/modtool/core/update.py
+++ b/gr-utils/python/modtool/core/update.py
@@ -31,6 +31,7 @@ import logging
 
 from gnuradio.grc.converter import Converter
 from .base import ModTool, ModToolException
+from ..tools import get_modname
 
 logger = logging.getLogger(__name__)
 
@@ -39,9 +40,10 @@ def get_xml_candidates():
     """ Returns a list of XML candidates for update """
     xml_candidates = []
     xml_files = [x for x in glob.glob1("grc", "*.xml")]
+    mod_name = get_modname()
     for candidate in xml_files:
         candidate = os.path.splitext(candidate)[0]
-        candidate = candidate.split("_", 1)[-1]
+        candidate = candidate.split(mod_name + "_", 1)[-1]
         xml_candidates.append(candidate)
     return xml_candidates
 
-- 
cgit v1.2.3