[sr-dev] [kamailio/kamailio] [Feature Request] Python3 compatibility for dbtextdb (#1747)

Victor Seva notifications at github.com
Mon May 4 12:31:32 CEST 2020


It seems that https://github.com/kamailio/kamailio/commit/bc8bdcaa726f375f6deea8228a1ab0cf97c67035 commit broke something:

the previous version was passing:
```
$ git checkout 9df9c6e10ffe0851b7f4f2f00697c5644aaf9faa
utils/kamctl/dbtextdb $ python2 dbtextdb_test.py                                                                                                        ...
----------------------------------------------------------------------
Ran 3 tests in 0.006s

OK
```

Now it fails for python2 and python3 (same errors):
```
python2 dbtextdb_test.py
EEE
======================================================================
ERROR: testExecute (__main__.DBTextTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "dbtextdb_test.py", line 404, in testExecute
    result = db_conn.Execute(query, writethru)
  File "/home/vseva/data/projects/kamailio/utils/kamctl/dbtextdb/dbtextdb.py", line 403, in Execute
    self.ParseQuery(query)
  File "/home/vseva/data/projects/kamailio/utils/kamctl/dbtextdb/dbtextdb.py", line 453, in ParseQuery
    self._ParseCommand()
  File "/home/vseva/data/projects/kamailio/utils/kamctl/dbtextdb/dbtextdb.py", line 469, in _ParseCommand
    raise ParseError('Unsupported command: ' + self.command)
ParseError: Unsupported command: '

======================================================================
ERROR: testOpenTable (__main__.DBTextTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "dbtextdb_test.py", line 342, in testOpenTable
    db_conn.ParseQuery(query)
  File "/home/vseva/data/projects/kamailio/utils/kamctl/dbtextdb/dbtextdb.py", line 453, in ParseQuery
    self._ParseCommand()
  File "/home/vseva/data/projects/kamailio/utils/kamctl/dbtextdb/dbtextdb.py", line 469, in _ParseCommand
    raise ParseError('Unsupported command: ' + self.command)
ParseError: Unsupported command: t

======================================================================
ERROR: testParseQuery (__main__.DBTextTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "dbtextdb_test.py", line 27, in testParseQuery
    db_conn.ParseQuery(query_normal)
  File "/home/vseva/data/projects/kamailio/utils/kamctl/dbtextdb/dbtextdb.py", line 453, in ParseQuery
    self._ParseCommand()
  File "/home/vseva/data/projects/kamailio/utils/kamctl/dbtextdb/dbtextdb.py", line 469, in _ParseCommand
    raise ParseError('Unsupported command: ' + self.command)
ParseError: Unsupported command: r

----------------------------------------------------------------------
Ran 3 tests in 0.000s

FAILED (errors=3)
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1747#issuecomment-623385834
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200504/3b49841d/attachment.html>


More information about the sr-dev mailing list