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/Platform.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/Platform.py')
-rw-r--r-- | grc/base/Platform.py | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/grc/base/Platform.py b/grc/base/Platform.py index 096fdec41..a66c28ab9 100644 --- a/grc/base/Platform.py +++ b/grc/base/Platform.py @@ -1,5 +1,5 @@ """ -Copyright 2008, 2009, 2011 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 @@ -17,16 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA """ -#Perform python integrity checks: -# GRC will not work with interpreters that fail the checks below. -# This can fail on interpreters built with special optimizations. -try: - assert False - raise Exception, 'Failed python integrity check: assert not supported' -except AssertionError: pass -if __doc__ is None: - raise Exception, 'Failed python integrity check: __doc__ not supported' - import os import sys from .. base import ParseXML, odict @@ -91,13 +81,12 @@ class Platform(_Element): block = self.Block(self._flow_graph, n) key = block.get_key() #test against repeated keys - try: - assert key not in self.get_block_keys() - #store the block + if key in self.get_block_keys(): + print >> sys.stderr, 'Warning: Block with key "%s" already exists.\n\tIgnoring: %s'%(key, xml_file) + #store the block + else: self._blocks[key] = block self._blocks_n[key] = n - except AssertionError: - print >> sys.stderr, 'Warning: Block with key "%s" already exists.\n\tIgnoring: %s'%(key, xml_file) except ParseXML.XMLSyntaxError, e: try: #try to add the xml file as a block tree ParseXML.validate_dtd(xml_file, BLOCK_TREE_DTD) |