Module: kamailio Branch: master Commit: 6aa1a84c6e37e0d6d5a725d43636debeaf5fa3b4 URL: https://github.com/kamailio/kamailio/commit/6aa1a84c6e37e0d6d5a725d43636debe...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2022-06-24T08:19:56+02:00
kamctl/dbtextdb: solve TypeError: a bytes-like object is required, not 'str'
- GH #2469
---
Modified: utils/kamctl/dbtextdb/dbtextdb.py
---
Diff: https://github.com/kamailio/kamailio/commit/6aa1a84c6e37e0d6d5a725d43636debe... Patch: https://github.com/kamailio/kamailio/commit/6aa1a84c6e37e0d6d5a725d43636debe...
---
diff --git a/utils/kamctl/dbtextdb/dbtextdb.py b/utils/kamctl/dbtextdb/dbtextdb.py index 581496c309d..0efe419026c 100755 --- a/utils/kamctl/dbtextdb/dbtextdb.py +++ b/utils/kamctl/dbtextdb/dbtextdb.py @@ -1135,7 +1135,7 @@ def WriteTempTable(self): else: header = '%s)' % header
- self.temp_file.write(header.strip() + '\n') + self.temp_file.write((header.strip() + '\n').encode())
# write data for row in self.data: @@ -1143,7 +1143,7 @@ def WriteTempTable(self): for col in columns: row_str = '%s:%s' % (row_str, row[col])
- self.temp_file.write(row_str[1:] + '\n') + self.temp_file.write((row_str[1:] + '\n').encode())
self.temp_file.flush()