'gr_modtool add' fails if new module name ends in '0'. Includes solution

GNUradio 3.6.4.1
Ubuntu 12.04 LTS (32 bit)
VMWare on Windows 7

The gr_modtool is a great help to get started.

However, my module name happened to end in ‘0’.

Try this:

~/gnr$ gr_modtool newmod my_module0
Creating out-of-tree module in ./gr-my_module0… Done.
Use ‘gr_modtool add’ to add a new block to this currently empty module.
~/gnr$ cd gr-my_module0
~/gnr/gr-my_module0$ gr_modtool add -t general my_block
GNU Radio module name identified: my_module

(… the script continues and fails at the end, as it mistakenly thinks
the version is 36)

Note that the ‘0’ was stripped off the name ‘my_module0’ above.

The line in error is in file util_functions.py in function
get_modname().

The ‘a-zA-Z1-9’ range below should be 0-9 instead (about line 95):

regexp = r’(project\ …… gr-(?P[a-zA-Z1-9-_]
……

Someone please fix (I tried the change, it works).

Thanks,
Tim Monahan-Mitchell

On Tue, Apr 02, 2013 at 08:30:42PM +0000, Monahan-Mitchell, Tim wrote:

The line in error is in file util_functions.py in function get_modname().

The ‘a-zA-Z1-9’ range below should be 0-9 instead (about line 95):

regexp = r’(project\ …… gr-(?P[a-zA-Z1-9-_]
……

Someone please fix (I tried the change, it works).

Hi Tim,

thanks a lot for this specific and easy-to-reproduce bug report!

I’ve committed the fix, expect to see it in the reps any time soon.

MB


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association