sandialabs / sceptre-phenix-apps

Apps written to work with the latest version of phenix
https://github.com/sandialabs/sceptre-phenix
GNU General Public License v3.0
6 stars 14 forks source link

Fix os.exit error in cc phenix scorch app #10

Closed beleyj closed 1 year ago

beleyj commented 1 year ago

os.exit(int) is not a valid function. os._exit(int) is valid, however, is mainly used when exiting child processes which does not appear to be occurring with this code. Based on this, I switched the code to use sys.exit(1)

results validation failed: 1Traceback (most recent call last): File /usr/local/bin/phenix-scorch-component-cc, line 8, in sys.exit(main()) File /usr/local/lib/python3.8/dist-packages/phenix_apps/apps/scorch/cc/cc.py, line 161, in main CC() File /usr/local/lib/python3.8/dist-packages/phenix_apps/apps/scorch/cc/cc.py, line 11, in init self.execute_stage() File /usr/local/lib/python3.8/dist-packages/phenix_apps/apps/scorch/init.py, line 104, in execute_stage stages_dictself.stage File /usr/local/lib/python3.8/dist-packages/phenix_apps/apps/scorch/cc/cc.py, line 19, in start self.__run('start') File /usr/local/lib/python3.8/dist-packages/phenix_apps/apps/scorch/cc/cc.py, line 90, in __run os.exit(1)AttributeError: module 'os' has no attribute 'exit'

activeshadow commented 1 year ago

Thanks @beleyj for the PR!