mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
fix: [pystemon-feeder] fix #234
This commit is contained in:
parent
000d5bf40a
commit
6f2dbcb4e2
1 changed files with 5 additions and 4 deletions
|
@ -62,11 +62,12 @@ while True:
|
||||||
print(paste)
|
print(paste)
|
||||||
if paste is None:
|
if paste is None:
|
||||||
continue
|
continue
|
||||||
socket.send("%d %s" % (topic, paste))
|
socket.send_string("%d %s" % (topic, paste))
|
||||||
topic = 102
|
topic = 102
|
||||||
try:
|
try:
|
||||||
messagedata = open(pystemonpath+paste).read()
|
with open(pystemonpath+paste, 'rb') as f: #.read()
|
||||||
socket.send("%d %s %s" % (topic, paste, base64.b64encode(messagedata)))
|
messagedata = f.read()
|
||||||
|
socket.send_string("%d %s %s" % (topic, paste, base64.b64encode(messagedata).decode()))
|
||||||
sleep_inc = sleep_inc-0.01 if sleep_inc-0.01 > 0 else 0
|
sleep_inc = sleep_inc-0.01 if sleep_inc-0.01 > 0 else 0
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
# file not found, could be a buffering issue -> increase sleeping time
|
# file not found, could be a buffering issue -> increase sleeping time
|
||||||
|
|
Loading…
Reference in a new issue