blob: ed2dd3f23519daf84837aaaf5f4bfec0a4ec31ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
from .tour_config import Constants
import socket
class Goniec(object):
def __init__(self, config):
self.config = config
def send(self, files=[]):
if self.config['enabled']:
content_lines = [Constants.path] + files + ['bye', '']
goniec = socket.socket()
goniec.connect((self.config['host'], self.config['port']))
goniec.sendall('\n'.join(content_lines))
goniec.close()
|