From a117a7fc5c4bb4d581489132731647fffcf8b960 Mon Sep 17 00:00:00 2001
From: Marcus Müller <mmueller@gnuradio.org>
Date: Sun, 21 Apr 2019 15:54:33 +0200
Subject: modtool/newmod: Better error reporting on wrong template dir

---
 gr-utils/python/modtool/core/newmod.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'gr-utils/python')

diff --git a/gr-utils/python/modtool/core/newmod.py b/gr-utils/python/modtool/core/newmod.py
index fbe1731783..9eb80fccf7 100644
--- a/gr-utils/python/modtool/core/newmod.py
+++ b/gr-utils/python/modtool/core/newmod.py
@@ -54,7 +54,7 @@ class ModToolNewModule(ModTool):
 
     def validate(self):
         """ Validates the arguments """
-        if self.info['modname'] is None:
+        if not self.info['modname']:
             raise ModToolException('Module name not specified.')
         if not re.match('[a-zA-Z0-9_]+$', self.info['modname']):
             raise ModToolException('Invalid module name.')
@@ -65,7 +65,7 @@ class ModToolNewModule(ModTool):
         else:
             raise ModToolException('The given directory exists.')
         if not os.path.isdir(self.srcdir):
-            raise ModToolException('Could not find gr-newmod source dir.')
+            raise ModToolException('Could not find gr-newmod source dir \'' + self.srcdir + '\'')
 
     def run(self):
         """
-- 
cgit v1.2.3