commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r11251 - gnuradio/branches/developers/jblum/grc/grc/py


From: jblum
Subject: [Commit-gnuradio] r11251 - gnuradio/branches/developers/jblum/grc/grc/python
Date: Sun, 21 Jun 2009 00:14:08 -0600 (MDT)

Author: jblum
Date: 2009-06-21 00:14:08 -0600 (Sun, 21 Jun 2009)
New Revision: 11251

Modified:
   gnuradio/branches/developers/jblum/grc/grc/python/convert_hier.py
Log:
fix bug for case when hier blocks have no params

Modified: gnuradio/branches/developers/jblum/grc/grc/python/convert_hier.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/python/convert_hier.py   
2009-06-21 03:16:11 UTC (rev 11250)
+++ gnuradio/branches/developers/jblum/grc/grc/python/convert_hier.py   
2009-06-21 06:14:08 UTC (rev 11251)
@@ -38,10 +38,11 @@
        block_n['category'] = block_category
        block_n['import'] = 'execfile("%s")'%python_file
        #make data
-       block_n['make'] = '%s(\n\t%s,\n)'%(
+       if parameters: block_n['make'] = '%s(\n\t%s,\n)'%(
                block_key,
                ',\n\t'.join(['%s=$%s'%(param.get_id(), param.get_id()) for 
param in parameters]),
        )
+       else: block_n['make'] = '%s()'%block_key
        #callback data
        block_n['callback'] = ['set_%s($%s)'%(param.get_id(), param.get_id()) 
for param in parameters]
        #param data





reply via email to

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