From 4a342fd9157cb434ca0f954fc9b480dbe0aea3aa Mon Sep 17 00:00:00 2001 From: clamsawd Date: Fri, 30 Oct 2015 17:35:01 +0100 Subject: [PATCH] Removed 'curl' dependency --- ip2e-config.py | 1 - ip2e-daemon.py | 23 ++--------------------- ip2e-log.py | 1 - 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/ip2e-config.py b/ip2e-config.py index a30216e..6dc013a 100755 --- a/ip2e-config.py +++ b/ip2e-config.py @@ -7,7 +7,6 @@ # Licensed by GPL v.3 | # Last update: 30-10-2015 | # | -# Dependences: curl or wget | # Compatible with Python 3.x | # -------------------------------------------------------------- version="0.8-beta" diff --git a/ip2e-daemon.py b/ip2e-daemon.py index 184e6b7..604189b 100755 --- a/ip2e-daemon.py +++ b/ip2e-daemon.py @@ -7,19 +7,17 @@ # Licensed by GPL v.3 | # Last update: 30-10-2015 | # | -# Dependences: curl or wget | # Compatible with Python 3.x | # -------------------------------------------------------------- version="0.8-beta" #Import python-modules -import subprocess +import urllib +import urllib.request import os import sys import time import smtplib -import urllib -import urllib.request #Check if your system use Python 3.x if sys.version_info<(3,0): @@ -89,23 +87,6 @@ else: createip2eIPcf() writeip2eIPcf() -#Check if curl is installed -from subprocess import PIPE, Popen -try: - curlCheck = Popen(['curl', '--version'], stdout=PIPE, stderr=PIPE) - curlCheck.stderr.close() -except: - ClearScreen() - print ("") - print ("Error: 'curl' is not installed!") - print ("") - print ("Help:") - print (" * http://curl.haxx.se/download.html") - print (" * http://www.paehl.com/open_source/?CURL_7.45.0") - print ("") - PauseExit=input("Press ENTER to exit ") - exit(1) - #Import variables from ip2e-conf.py exec(open("ip2e-conf.py").read()) diff --git a/ip2e-log.py b/ip2e-log.py index 9f88388..eb15bbc 100755 --- a/ip2e-log.py +++ b/ip2e-log.py @@ -7,7 +7,6 @@ # Licensed by GPL v.3 | # Last update: 30-10-2015 | # | -# Dependences: curl or wget | # Compatible with Python 3.x | # -------------------------------------------------------------- version="0.8-beta"