Merge pull request #1 from BjornArnelid/master
Indentation corrected, and replaced tab with four spaces.
This commit is contained in:
Коммит
da6e2d35be
|
@ -14,9 +14,9 @@ import pytz
|
||||||
import json
|
import json
|
||||||
import socket
|
import socket
|
||||||
try:
|
try:
|
||||||
from requests_futures.sessions import FuturesSession as Session
|
from requests_futures.sessions import FuturesSession as Session
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from requests import Session
|
from requests import Session
|
||||||
|
|
||||||
class MozDefError(Exception):
|
class MozDefError(Exception):
|
||||||
def __init__(self, msg):
|
def __init__(self, msg):
|
||||||
|
@ -78,8 +78,8 @@ class MozDefMsg():
|
||||||
raise MozDefError('Summary is a required field')
|
raise MozDefError('Summary is a required field')
|
||||||
|
|
||||||
if self.debug:
|
if self.debug:
|
||||||
print(json.dumps(log_msg, sort_keys=True, indent=4))
|
print(json.dumps(log_msg, sort_keys=True, indent=4))
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
r = self.httpsession.post(self.mozdef_hostname, json.dumps(log_msg, sort_keys=True, indent=4), verify=self.verify_certificate, background_callback=self.httpsession_cb)
|
r = self.httpsession.post(self.mozdef_hostname, json.dumps(log_msg, sort_keys=True, indent=4), verify=self.verify_certificate, background_callback=self.httpsession_cb)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче