checkrestart: Fix "TypeError: a bytes-like object is required, not 'str'"
Happened when calling "checkrestart -p":
Traceback (most recent call last):
File "/usr/sbin/checkrestart", line 742, in <module>
main()
File "/usr/sbin/checkrestart", line 149, in main
toRestart = lsoffilescheck(blacklist = blacklist)
File "/usr/sbin/checkrestart", line 358, in lsoffilescheck
toRestart = [process for process in list(processes.values()) if
process.needsRestart(blacklist)]
File "/usr/sbin/checkrestart", line 358, in <listcomp>
toRestart = [process for process in list(processes.values()) if
process.needsRestart(blacklist)]
File "/usr/sbin/checkrestart", line 726, in needsRestart
if isdeletedFile(f, blacklist):
File "/usr/sbin/checkrestart", line 526, in isdeletedFile
file_query_check[file_name] = ispackagedFile(file_name)
File "/usr/sbin/checkrestart", line 438, in ispackagedFile
if line.find('no path found matching pattern ' + f) > 0:
TypeError: a bytes-like object is required, not 'str'
Closes: #851992
Thanks to Benedikt Trefzer for the bug report!
Axel Beckert
7 years ago
428 | 428 |
if verbose:
|
429 | 429 |
print("[DEBUG] Running: %s" % ' '.join(dpkgQuery))
|
430 | 430 |
dpkgProc = subprocess.Popen(dpkgQuery, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
431 | |
env = lc_all_c_env, close_fds=True)
|
|
431 |
env = lc_all_c_env, close_fds=True, universal_newlines=True)
|
432 | 432 |
dpkgProc.wait()
|
433 | 433 |
if verbose:
|
434 | 434 |
print("[DEBUG] Running: %s" % ' '.join(dpkgQuery))
|
|
0 |
debian-goodies (0.68) UNRELEASED; urgency=medium
|
|
1 |
|
|
2 |
* Fix "TypeError: a bytes-like object is required, not 'str'" when
|
|
3 |
checkrestart is called with "-p". (Closes: #851992) Thanks to Benedikt
|
|
4 |
Trefzer for the bug report!
|
|
5 |
|
|
6 |
-- Axel Beckert <abe@debian.org> Sat, 21 Jan 2017 16:31:33 +0100
|
|
7 |
|
0 | 8 |
debian-goodies (0.67) unstable; urgency=low
|
1 | 9 |
|
2 | 10 |
* Add a rudimentary which-pkg-broke-build. (It's a wrapper around
|