#182 libtaskotron builds are failing due to missing /dev/log in mock
Closed: Fixed None Opened 9 years ago by tflink.

When building libtaskotron in mock, the following error shows up:

+ /usr/bin/python setup.py test
running test
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 77, in wrap_session
INTERNALERROR>     config.do_configure()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/config.py", line 608, in do_configure
INTERNALERROR>     self.hook.pytest_configure(config=self)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 368, in __call__
INTERNALERROR>     return self._docall(methods, kwargs)
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 379, in _docall
INTERNALERROR>     res = mc.execute()
INTERNALERROR>   File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 297, in execute
INTERNALERROR>     res = method(**kwargs)
INTERNALERROR>   File "/builddir/build/BUILD/libtaskotron-0.3.4/testing/conftest.py", line 58, in pytest_configure
INTERNALERROR>     libtaskotron.logger.init_prior_config()
INTERNALERROR>   File "/builddir/build/BUILD/libtaskotron-0.3.4/libtaskotron/logger.py", line 85, in init_prior_config
INTERNALERROR>     _create_handlers()
INTERNALERROR>   File "/builddir/build/BUILD/libtaskotron-0.3.4/libtaskotron/logger.py", line 58, in _create_handlers
INTERNALERROR>     facility=logging.handlers.SysLogHandler.LOG_LOCAL4)
INTERNALERROR>   File "/usr/lib64/python2.7/logging/handlers.py", line 760, in __init__
INTERNALERROR>     self._connect_unixsocket(address)
INTERNALERROR>   File "/usr/lib64/python2.7/logging/handlers.py", line 788, in _connect_unixsocket
INTERNALERROR>     self.socket.connect(address)
INTERNALERROR>   File "/usr/lib64/python2.7/socket.py", line 224, in meth
INTERNALERROR>     return getattr(self._sock,name)(*args)
INTERNALERROR> error: [Errno 2] No such file or directory
Exception TypeError: "'NoneType' object is not callable" in <function _removeHandlerRef at 0x2b9d230> ignored

Fix the code so that the tests don't explode during rpmbuild.


This ticket had assigned some Differential requests:
D195

The problem is that /dev/log doesn't exist it mock, therefore syslog handler can't be created:

        syslog_handler = logging.handlers.SysLogHandler(address='/dev/log',
                             facility=logging.handlers.SysLogHandler.LOG_LOCAL4)

Login to comment on this ticket.

Metadata