Skip to content
Success

Changes

Summary

  1. trx_toolkit/clck_gen: Fix DeprecationWarning about Thread.setDaemon (details)
Commit 008dfba7d8511912e7a1dbc3a32d89bfee007b16 by Kirill Smelkov
trx_toolkit/clck_gen: Fix DeprecationWarning about Thread.setDaemon

This warning is currently emitted each time trx_toolkit unittests are run:

    (osmo.venv) kirr@deca:~/src/osmocom/bb/src/target/trx_toolkit$ python -m unittest discover
    /home/kirr/src/osmocom/bb/src/target/trx_toolkit/clck_gen.py:71: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
      self._thread.setDaemon(True)
    ...............................................
    ----------------------------------------------------------------------
    Ran 47 tests in 0.997s

    OK

-> Fix it by using Thread.daemon attribute directly as suggested by
   https://docs.python.org/3/library/threading.html#threading.Thread.setDaemon

Change-Id: I6ef70762f671b86342daa35a097532f0b620aaca
The file was modifiedsrc/target/trx_toolkit/clck_gen.py