Package: python3-twisted Version: 16.3.0-1 Severity: normal Tags: patch upstream
Stale pid files confuse twistd: evgeni@nana ~ % echo 123 > twistd.pid evgeni@nana ~ % twistd web Removing stale pidfile /home/evgeni/twistd.pid evgeni@nana ~ % echo 123 > twistd.pid evgeni@nana ~ % twistd3 web Traceback (most recent call last): File "/usr/lib/python3/dist-packages/twisted/scripts/_twistd_unix.py", line 90, in checkPID os.kill(pid, 0) ProcessLookupError: [Errno 3] No such process During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/twistd3", line 18, in <module> run() File "/usr/lib/python3/dist-packages/twisted/scripts/twistd.py", line 29, in run app.run(runApp, ServerOptions) File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 643, in run runApp(config) File "/usr/lib/python3/dist-packages/twisted/scripts/twistd.py", line 25, in runApp _SomeApplicationRunner(config).run() File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 373, in run self.preApplication() File "/usr/lib/python3/dist-packages/twisted/scripts/_twistd_unix.py", line 193, in preApplication checkPID(self.config['pidfile']) File "/usr/lib/python3/dist-packages/twisted/scripts/_twistd_unix.py", line 92, in checkPID if why[0] == errno.ESRCH: TypeError: 'ProcessLookupError' object is not subscriptable (twistd is running python2, twistd3 python3) As per https://twistedmatrix.com/trac/ticket/8155 this needs a trivial change in _twistd_unix.py: - if why[0] == errno.ESRCH: + if why.args[0] = errno.ESRCH: Greets Evgeni -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages python3-twisted depends on: ii python3-openssl 16.0.0-2 ii python3-service-identity 16.0.0-2 ii python3-zope.interface 4.2.0-1 pn python3:any <none> Versions of packages python3-twisted recommends: pn python3-pam <none> ii python3-serial 3.1-2 Versions of packages python3-twisted suggests: pn python3-glade2 <none> pn python3-gtk2 <none> pn python3-qt4 <none> ii python3-tk 3.5.1-1 pn python3-wxgtk2.8 <none> -- no debconf information