Merge "Explicitly handle ImportError for pid_file_module"

This commit is contained in:
Jenkins 2016-09-09 20:39:11 +00:00 committed by Gerrit Code Review
commit a0d518a16f
1 changed files with 3 additions and 5 deletions

View File

@ -60,13 +60,11 @@ import twitter
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/