summaryrefslogtreecommitdiff
path: root/grc/core
diff options
context:
space:
mode:
authorJeff Long <willcode4@gmail.com>2021-07-13 07:23:48 -0400
committermormj <34754695+mormj@users.noreply.github.com>2021-07-19 09:59:52 -0400
commit256953bebab151c50fd9a32156f75d2aabc14c17 (patch)
tree402ead0921dc400a7404b5282fa2b788d0787d45 /grc/core
parent8dc130ab8f2a617071adada9192aeba807f31565 (diff)
grc: allow short and byte as valid types in an enum
Signed-off-by: Jeff Long <willcode4@gmail.com>
Diffstat (limited to 'grc/core')
-rw-r--r--grc/core/Constants.py2
-rw-r--r--grc/core/params/param.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/grc/core/Constants.py b/grc/core/Constants.py
index ebcf9ffeea..5d7565e647 100644
--- a/grc/core/Constants.py
+++ b/grc/core/Constants.py
@@ -46,7 +46,7 @@ HIER_BLOCK_FILE_MODE = stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IWGRP
PARAM_TYPE_NAMES = {
'raw', 'enum',
- 'complex', 'real', 'float', 'int',
+ 'complex', 'real', 'float', 'int', 'short', 'byte',
'complex_vector', 'real_vector', 'float_vector', 'int_vector',
'hex', 'string', 'bool',
'file_open', 'file_save', 'dir_select', '_multiline', '_multiline_python_external',
diff --git a/grc/core/params/param.py b/grc/core/params/param.py
index 9e612abf91..041771f52a 100644
--- a/grc/core/params/param.py
+++ b/grc/core/params/param.py
@@ -203,7 +203,7 @@ class Param(Element):
#########################
# Numeric Types
#########################
- elif dtype in ('raw', 'complex', 'real', 'float', 'int', 'hex', 'bool'):
+ elif dtype in ('raw', 'complex', 'real', 'float', 'int', 'short', 'byte', 'hex', 'bool'):
if expr:
try:
if isinstance(expr, str) and self.is_float(expr[:-1]):