File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed
Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change 77import socket
88import json
99import logging
10- import encodings .idna
1110
12- import mamonsu .lib .platform as platform
1311from mamonsu .lib .plugin import Plugin
1412from mamonsu .lib .queue import Queue
1513from itertools import islice
@@ -102,10 +100,7 @@ def send_file_to_zabbix(self, path):
102100
103101 def _send_data (self , data ):
104102 data_len = struct .pack ('<Q' , len (data ))
105- if platform .PY3 :
106- packet = b'ZBXD\x01 ' + data_len + str .encode (data )
107- else :
108- packet = 'ZBXD\x01 ' + data_len + data
103+ packet = b'ZBXD\x01 ' + data_len + str .encode (data )
109104 try :
110105 sock = socket .socket ()
111106 sock .connect ((self .host , self .port ))
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22
33from __future__ import print_function
4- import sys
54import logging
65import optparse
76import os
2120if platform .LINUX :
2221 import pwd
2322
24- from mamonsu .tools .report .format import TermColor
25-
26- if platform .PY2 :
27- reload (sys )
28- sys .setdefaultencoding ('utf-8' )
29-
3023
3124class Args (DefaultConfig ):
3225
You can’t perform that action at this time.
0 commit comments