summaryrefslogtreecommitdiff
path: root/grc/src/platforms/python/Param.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/src/platforms/python/Param.py')
-rw-r--r--grc/src/platforms/python/Param.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/grc/src/platforms/python/Param.py b/grc/src/platforms/python/Param.py
index e75a882a4..10caa4c21 100644
--- a/grc/src/platforms/python/Param.py
+++ b/grc/src/platforms/python/Param.py
@@ -63,6 +63,9 @@ class FileParam(EntryParam):
self._handle_changed()
file_dialog.destroy() #destroy the dialog
+#blacklist certain ids, its not complete, but should help
+import __builtin__
+ID_BLACKLIST = ['options', 'gr', 'blks2', 'wxgui', 'wx', 'math', 'forms', 'firdes'] + dir(__builtin__)
#define types, native python + numpy
VECTOR_TYPES = (tuple, list, set, numpy.ndarray)
COMPLEX_TYPES = [complex, numpy.complex, numpy.complex64, numpy.complex128]
@@ -309,6 +312,10 @@ class Param(_Param):
except:
self._add_error_message('ID "%s" is not unique.'%v)
raise Exception
+ try: assert v not in ID_BLACKLIST
+ except:
+ self._add_error_message('ID "%s" is blacklisted.'%v)
+ raise Exception
return v
#########################
# Grid Position Type