]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/devicehealth: import _strptime directly 32082/head
authorSage Weil <sage@redhat.com>
Fri, 6 Dec 2019 14:30:53 +0000 (08:30 -0600)
committerSage Weil <sage@redhat.com>
Fri, 6 Dec 2019 14:30:53 +0000 (08:30 -0600)
commit7ad737697453b633b3dcebec44ed9f97984d5bee
tree6dd528d7e89fb9df19ac6876ddcf483c32bc634e
parent01671e19be3ed88e8adf6e94e37e199ad0b79934
mgr/devicehealth: import _strptime directly

On some machines (in my case, ubuntu 18.04 with 2.7.15+), I see

MGR_MODULE_ERROR Module 'devicehealth' has failed: Failed to import _strptime because the import lockis held by another thread.
    Module 'devicehealth' has failed: Failed to import _strptime because the import lockis held by another thread.

This is apparently an issue with datetime on py2, see

https://www.raspberrypi.org/forums/viewtopic.php?t=166912

Doing the import explicitly is a simple workaround (and resolves the
warning in my test case).

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/devicehealth/module.py