From 25752da5dbb5c512dd2427aa8af68c1d99e735b4 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Mon, 3 Oct 2016 13:38:30 +0200 Subject: [PATCH] little change on httpRequest --- plugins/httpRequest/httpRequest.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/httpRequest/httpRequest.py b/plugins/httpRequest/httpRequest.py index 9083913..8002b16 100644 --- a/plugins/httpRequest/httpRequest.py +++ b/plugins/httpRequest/httpRequest.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# -*- coding: cp1252 -*- +# -*- coding: UTF-8 -*- """ httpRequest-Plugin to dispatch FMS-, ZVEI- and POCSAG - messages to an URL @@ -14,7 +14,6 @@ httpRequest-Plugin to dispatch FMS-, ZVEI- and POCSAG - messages to an URL # # Imports # -#import httplib #for the HTTP request import urllib2 import urllib import time @@ -89,7 +88,6 @@ def run(typ,freq,data): logging.warning("Invalid Typ: %s", typ) return - # # HTTP-Request # @@ -98,10 +96,9 @@ def run(typ,freq,data): try: resp = urllib2.urlopen(url) except urllib2.HTTPError as e: - logging.error("HTTP response: %s", e.code) + logging.warning("HTTP response: %s", e.code) except urllib2.URLError as e: - logging.error("HTTP-specific error: %s", e.args) - + logging.warning("HTTP-specific error: %s", e.args) except: logging.error("cannot send HTTP request")