print error message when running with python 2

This commit is contained in:
jacob1 2015-01-14 22:53:11 -05:00
parent 39c437517f
commit 91c2c26a45

View File

@ -17,20 +17,20 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE. # THE SOFTWARE.
import sys
if sys.version_info < (3, 2):
print('Python 3.2 or newer is required to run the bot.')
sys.exit(1)
from oyoyo.client import IRCClient from oyoyo.client import IRCClient
import botconfig import botconfig
import time import time
import traceback import traceback
import modules.common import modules.common
import sys
import tools import tools
def main(): def main():
if sys.version_info < (3, 2):
print('Python 3.2 or newer is required to run the bot.')
sys.exit(1)
cli = IRCClient( cli = IRCClient(
{"privmsg": modules.common.on_privmsg, {"privmsg": modules.common.on_privmsg,
"notice": lambda a, b, c, d: modules.common.on_privmsg(a, b, c, d, True), "notice": lambda a, b, c, d: modules.common.on_privmsg(a, b, c, d, True),