Explicitly handle ImportError for pid_file_module

Change-Id: Ide9f386a1819b5111d54a75231ff996179f43ecb
This commit is contained in:
Dolph Mathews 2015-10-12 19:24:17 +00:00
parent d58d5456c7
commit 6ba0de29a5
1 changed files with 3 additions and 5 deletions

View File

@ -52,13 +52,11 @@ import ssl
import urllib
try:
import daemon.pidlockfile
pid_file_module = daemon.pidlockfile
except:
import daemon.pidlockfile as pid_file_module
except ImportError:
# as of python-daemon 1.6 it doesn't bundle pidlockfile anymore
# instead it depends on lockfile-0.9.1
import daemon.pidfile
pid_file_module = daemon.pidfile
import daemon.pidfile as pid_file_module
# https://bitbucket.org/jaraco/irc/issue/34/