From fd22981d9d5bb95a526a142f0141da7f4cae0ba0 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 2 Oct 2003 05:11:40 +0000 Subject: [PATCH] Made it not raise an exception when Ctrl-C'ed. --- scripts/supybot-wizard.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/supybot-wizard.py b/scripts/supybot-wizard.py index 5e25e5f89..7d1c64001 100755 --- a/scripts/supybot-wizard.py +++ b/scripts/supybot-wizard.py @@ -132,7 +132,7 @@ def upgradeFromFormerBotscript(filename): #botscript = __import__(filename) ### Eh, just don't forget this. -if __name__ == '__main__': +def main(): ### Remember to do some optparse stuff here. Especially we need to ### remember to be able to upgrade from another created botscript. @@ -599,3 +599,9 @@ if __name__ == '__main__': you can start your bot script with the command line "./%s". If you're not running a *nix or similar machine, you'll just have to start it like you start all your other Python scripts.""" % (filename, filename)) + +if __name__ == '__main__': + try: + main() + except KeyboardInterrupt: + pass