From 9b4672e0981966e1322e3b18b4553460c6f5121e Mon Sep 17 00:00:00 2001 From: cclauss Date: Mon, 25 Sep 2017 19:20:12 +0200 Subject: [PATCH] Conditional import of http_client for Python 3 As discussed in #7 --- zeus.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zeus.py b/zeus.py index c713141..53de25e 100644 --- a/zeus.py +++ b/zeus.py @@ -5,7 +5,10 @@ import time import optparse import subprocess import random -import httplib as http_client +try: + import http.client as http_client # Python 3 +except ImportError: + import httplib as http_client # Python 2 from var import blackwidow from var.google_search import search