From 4f41cde8c65a76cfd74d40ec24b530ef3fe4a5f4 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 14 Apr 2011 09:37:27 -0700 Subject: grc: remove integrity checks, we wont need them when I'm done --- grc/base/Platform.py | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'grc/base/Platform.py') diff --git a/grc/base/Platform.py b/grc/base/Platform.py index 096fdec41..0620cf21b 100644 --- a/grc/base/Platform.py +++ b/grc/base/Platform.py @@ -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 -- cgit From 4cdd41c1046cef12601602bd38dc8ebf42d1550d Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 14 Apr 2011 10:05:33 -0700 Subject: grc: replaced asserts in python subdirectory --- grc/base/Platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'grc/base/Platform.py') diff --git a/grc/base/Platform.py b/grc/base/Platform.py index 0620cf21b..a6d420799 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 -- cgit From 66d7b23402dd9c366bb6c824d693274ccf3868db Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 14 Apr 2011 10:40:36 -0700 Subject: grc: replaced asserts in base subdirectory --- grc/base/Platform.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'grc/base/Platform.py') diff --git a/grc/base/Platform.py b/grc/base/Platform.py index a6d420799..a66c28ab9 100644 --- a/grc/base/Platform.py +++ b/grc/base/Platform.py @@ -81,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) -- cgit