Move python version check to the top of start.py

This commit is contained in:
jesopo 2019-05-30 17:15:40 +01:00
parent 5f8483c691
commit 480bbb604f

View file

@ -1,6 +1,12 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import argparse, faulthandler, os, platform, sys, time import sys
if sys.version_info < (3, 6):
sys.stderr.write("BitBot requires python 3.6.0 or later\n")
sys.exit(1)
import argparse, faulthandler, os, platform, time
from src import Cache, Config, Database, EventManager, Exports, IRCBot from src import Cache, Config, Database, EventManager, Exports, IRCBot
from src import Logging, ModuleManager, Timers, utils from src import Logging, ModuleManager, Timers, utils
@ -49,10 +55,6 @@ if not log_level:
log = Logging.Log(not args.no_logging, log_level, args.log_dir) log = Logging.Log(not args.no_logging, log_level, args.log_dir)
if sys.version_info < (3, 6):
sys.stderr.write("BitBot requires python 3.6.0 or later\n")
sys.exit(1)
log.info("Starting BitBot %s (Python v%s)", log.info("Starting BitBot %s (Python v%s)",
[IRCBot.VERSION, platform.python_version()]) [IRCBot.VERSION, platform.python_version()])