In ChipPlugin, do not call the editor if it's not there.

This commit is contained in:
Jean-Paul Chaput 2014-09-04 10:59:09 +02:00
parent e6c809a12a
commit c26a36db88
2 changed files with 7 additions and 7 deletions

View File

@ -178,26 +178,26 @@ def ScriptMain ( **kw ):
placeCore = PlaceCore( conf ) placeCore = PlaceCore( conf )
placeCore.validate() placeCore.validate()
placeCore.doFloorplan() placeCore.doFloorplan()
editor.fit() if editor: editor.fit()
placeCore.doPlacement() placeCore.doPlacement()
editor.fit() if editor: editor.fit()
corePower = chip.BlockPower.Block( conf ) corePower = chip.BlockPower.Block( conf )
corePower.connectPower() corePower.connectPower()
corePower.connectClock() corePower.connectClock()
corePower.doLayout() corePower.doLayout()
editor.fit() if editor: editor.fit()
coreCorona = chip.BlockCorona.Corona( corePower ) coreCorona = chip.BlockCorona.Corona( corePower )
coreCorona.connectPads( padsCorona ) coreCorona.connectPads( padsCorona )
coreCorona.connectBlock() coreCorona.connectBlock()
coreCorona.doLayout() coreCorona.doLayout()
editor.fit() if editor: editor.fit()
except ErrorMessage, e: except ErrorMessage, e:
print e; errorCode = e.code print e; errorCode = e.code
editor.fit() if editor: editor.fit()
except Exception, e: except Exception, e:
print '\n\n', e; errorCode = 1 print '\n\n', e; errorCode = 1
traceback.print_tb(sys.exc_info()[2]) traceback.print_tb(sys.exc_info()[2])

View File

@ -559,8 +559,8 @@ class ChipConfWrapper ( GaugeConfWrapper ):
def __init__ ( self, gaugeConf, chipConf ): def __init__ ( self, gaugeConf, chipConf ):
GaugeConfWrapper.__init__( self, gaugeConf ) GaugeConfWrapper.__init__( self, gaugeConf )
if not isinstance(chipConf,ChipConf): #if not isinstance(chipConf,ChipConf):
raise ErrorMessage( 1, 'Attempt to create a ChipConfWrapper() from non-ChipConf object.' ) # raise ErrorMessage( 1, 'Attempt to create a ChipConfWrapper() from non-ChipConf object.' )
self._chipConf = chipConf self._chipConf = chipConf
return return