Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/python-bareos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsergeymazin <sergey.mazin@pipedrive.com>2017-12-08 18:04:10 +0300
committersergeymazin <sergey.mazin@pipedrive.com>2017-12-08 18:04:10 +0300
commita798e76f9bd122d3746abb264d1bb9d4b8abe318 (patch)
tree3e6aab985b9c11550b56950cd9f0241a3ba5d648
parent3eac95079318faf2c2bcdfe797d8d7e07c76d0b8 (diff)
fix TypeError: a bytes-like object is required, not 'str'
-rw-r--r--bareos/bsock/lowlevel.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bareos/bsock/lowlevel.py b/bareos/bsock/lowlevel.py
index 30ee9d3..f103dd4 100644
--- a/bareos/bsock/lowlevel.py
+++ b/bareos/bsock/lowlevel.py
@@ -199,7 +199,7 @@ class LowLevel(object):
# check for regex in new submsg
# and last line in old message,
# which might have been incomplete without new submsg.
- lastlineindex = self.receive_buffer.rfind('\n') + 1
+ lastlineindex = self.receive_buffer.rfind(b'\n') + 1
self.receive_buffer += submsg
match = re.search(regex, self.receive_buffer[lastlineindex:], re.MULTILINE)
# Bareos indicates end of command result by line starting with 4 digits