Fix tutorial for python 3

This commit is contained in:
Robert Taylor 2022-12-06 01:50:49 +00:00 committed by Jean-Paul Chaput
parent 05c0f955c5
commit 29add5e898
2 changed files with 5 additions and 6 deletions

View File

@ -16,8 +16,7 @@ ninja = ">=1.10"
cmake = ">=3"
[tool.poetry.scripts]
blif2vst = 'Coriolis:blif2vst'
blif2vst = 'Coriolis:blif2vst'
cx2y = 'Coriolis:cx2y'
cyclop = 'Corilis:cyclop'
tutorial = 'Coriolis:tutorial'
@ -25,6 +24,6 @@ unittests = 'Coriolis:unittests'
yosys_coriolis = 'Coriolis:yosys_coriolis'
[build-system]
requires = ["poetry-core", "setuptools", "cmake"]
requires = ["poetry-core", "setuptools", "cmake", "patchelf"]
build-backend = "poetry.core.masonry.api"

View File

@ -12,7 +12,7 @@ try:
import CRL
import Unicorn
import Tutorial
except ImportError, e:
except ImportError as e:
serror = str(e)
if serror.startswith('No module named'):
module = serror.split()[-1]
@ -24,7 +24,7 @@ except ImportError, e:
print( ' Under RHEL 6, you must be under devtoolset-2.' )
print( ' (scl enable devtoolset-2 bash)' )
sys.exit(1)
except Exception, e:
except Exception as e:
print( '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' )
print( ' modules. Something may be wrong at Python/C API level.\n' )
print( ' {}'.format(e) )
@ -108,6 +108,6 @@ if __name__ == '__main__':
if cell: unicorn.setCell(cell)
unicorn.show()
ha.qtExec()
except Exception, e:
except Exception as e:
helpers.io.catch( e )
sys.exit(0)