As my understanding, if you write some sys.exit(1) in method ShowItems, then here it will catch the SystemExit and run the handling you write. It's kind of global system exit handler, so that you can get rid of the level by level exception handling and raising, just sys.exit(err_code) in any place critical.
But here your code is not doing such things. So actually, there's no exception handling here in your code. And because of that, The return ec.code is actually dead code. So the main() will always return 0 or throw unhandled exception.