mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-04-04 22:17:24 +00:00
edits for codacy (#310)
This commit is contained in:
parent
9d552e5d24
commit
acbef6591c
8 changed files with 46 additions and 46 deletions
|
|
@ -3,14 +3,14 @@
|
|||
from xml.dom.minidom import parseString
|
||||
|
||||
try:
|
||||
from http.client import HTTPSConnection
|
||||
from http.client import HTTPSConnection
|
||||
except ImportError:
|
||||
from httplib import HTTPSConnection
|
||||
from httplib import HTTPSConnection
|
||||
|
||||
try:
|
||||
from urllib.parse import urlencode
|
||||
from urllib.parse import urlencode
|
||||
except ImportError:
|
||||
from urllib import urlencode
|
||||
from urllib import urlencode
|
||||
|
||||
__version__ = "1.0"
|
||||
|
||||
|
|
@ -55,10 +55,10 @@ takes 2 optional arguments:
|
|||
|
||||
def delkey(self, key):
|
||||
"Removes a key (unregister ?)"
|
||||
if type(key) == str:
|
||||
if isinstance(key, str):
|
||||
if key in self._apikey:
|
||||
self._apikey.remove(key)
|
||||
elif type(key) == list:
|
||||
elif isinstance(key, list):
|
||||
for k in key:
|
||||
if key in self._apikey:
|
||||
self._apikey.remove(k)
|
||||
|
|
@ -71,7 +71,7 @@ takes 2 optional arguments:
|
|||
def pushWithAPIKey(self, apikey=[], application="", event="", description="", url="", contenttype=None, priority=0, batch_mode=False, html=False):
|
||||
"""Special Funktion"""
|
||||
if apikey:
|
||||
if type(apikey) == str:
|
||||
if isinstance(apikey, str):
|
||||
apikey = [apikey]
|
||||
self._apikey = uniq(apikey)
|
||||
return self.push(application, event, description, url, contenttype, priority, batch_mode, html)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue