diff options
author | Tom Rondeau | 2011-05-02 12:35:16 +0100 |
---|---|---|
committer | Tom Rondeau | 2011-05-02 12:35:16 +0100 |
commit | 207a2ae73bd5d6cab201bb57ed8db64fd54cfd90 (patch) | |
tree | 3a828f115fdf011b7f78e45d75c45b7c4912a046 /grc/base/Port.py | |
parent | 7a91b8226f71d75b027beb466f965bbba97c07a8 (diff) | |
parent | a92cb89b5529728d9fce781aff85916b3879fbdd (diff) | |
download | gnuradio-207a2ae73bd5d6cab201bb57ed8db64fd54cfd90.tar.gz gnuradio-207a2ae73bd5d6cab201bb57ed8db64fd54cfd90.tar.bz2 gnuradio-207a2ae73bd5d6cab201bb57ed8db64fd54cfd90.zip |
Merge branch 'mergeme/grc/cross_platform_work'
Diffstat (limited to 'grc/base/Port.py')
-rw-r--r-- | grc/base/Port.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/grc/base/Port.py b/grc/base/Port.py index 494ea894f..7a1b5d4e6 100644 --- a/grc/base/Port.py +++ b/grc/base/Port.py @@ -1,5 +1,5 @@ """ -Copyright 2008, 2009 Free Software Foundation, Inc. +Copyright 2008-2011 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion is free software; you can redistribute it and/or @@ -42,8 +42,8 @@ class Port(Element): The port must be non-empty and type must a possible type. """ Element.validate(self) - try: assert self.get_type() in self.get_types() - except AssertionError: self.add_error_message('Type "%s" is not a possible type.'%self.get_type()) + if self.get_type() not in self.get_types(): + self.add_error_message('Type "%s" is not a possible type.'%self.get_type()) def __str__(self): if self.is_source(): |