Add import sys to ifmain, defmain.

This commit is contained in:
voussoir 2021-08-12 16:40:37 -07:00
parent 3876e7b02a
commit 11ef6504bb
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB
2 changed files with 4 additions and 0 deletions

View file

@ -1,5 +1,7 @@
<snippet> <snippet>
<content><![CDATA[ <content><![CDATA[
import sys
def main(argv): def main(argv):
return 0 return 0

View file

@ -1,5 +1,7 @@
<snippet> <snippet>
<content><![CDATA[ <content><![CDATA[
import sys
if __name__ == '__main__': if __name__ == '__main__':
raise SystemExit(main(sys.argv[1:])) raise SystemExit(main(sys.argv[1:]))