[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/01: Merge branch 'master' into next
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/01: Merge branch 'master' into next |
Date: |
Tue, 21 Mar 2017 18:32:50 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch next
in repository gnuradio.
commit ad451c9eee0e6ea9bee981b222cf98aa66a6b52c
Merge: 6c75cec 80f1bc7
Author: Johnathan Corgan <address@hidden>
Date: Tue Mar 21 11:25:44 2017 -0700
Merge branch 'master' into next
Conflicts:
grc/core/Param.py
grc/core/Param.py | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --cc grc/core/Param.py
index fd098b7,afa478b..a9a664f
--- a/grc/core/Param.py
+++ b/grc/core/Param.py
@@@ -479,14 -484,21 +479,21 @@@ class Param(Element)
elif t == 'id':
# Can python use this as a variable?
if not _check_id_matcher.match(v):
- raise Exception('ID "{0}" must begin with a letter and may
contain letters, numbers, and underscores.'.format(v))
+ raise Exception('ID "{}" must begin with a letter and may
contain letters, numbers, and underscores.'.format(v))
- ids = [param.get_value() for param in self.get_all_params(t)]
+ ids = [param.get_value() for param in self.get_all_params(t,
'id')]
- # Id should only appear once, or zero times if block is disabled
- if ids.count(v) > 1:
- raise Exception('ID "{}" is not unique.'.format(v))
if v in ID_BLACKLIST:
- raise Exception('ID "{0}" is blacklisted.'.format(v))
+ raise Exception('ID "{}" is blacklisted.'.format(v))
+
+ if self._key == 'id':
+ # Id should only appear once, or zero times if block is
disabled
+ if ids.count(v) > 1:
- raise Exception('ID "{0}" is not unique.'.format(v))
++ raise Exception('ID "{}" is not unique.'.format(v))
+ else:
+ # Id should exist to be a reference
+ if ids.count(v) < 1:
- raise Exception('ID "{0}" does not exist.'.format(v))
++ raise Exception('ID "{}" does not exist.'.format(v))
+
return v
#########################