Codebase list debian-goodies / aafe67a
Avoid "must be bytes or a tuple of bytes" error with recent Python 3 versions Full error message: "TypeError: startswith first arg must be bytes or a tuple of bytes, not str" Axel Beckert 7 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
178178 dpkgProc = subprocess.Popen(dpkgQuery, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
179179 env = lc_all_c_env)
180180 while True:
181 line = dpkgProc.stdout.readline()
181 line = dpkgProc.stdout.readline().decode("utf-8")
182182 if not line:
183183 break
184184 if verbose:
240240 dpkgProc = subprocess.Popen(dpkgQuery, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
241241 env = lc_all_c_env)
242242 while True:
243 line = dpkgProc.stdout.readline()
243 line = dpkgProc.stdout.readline().decode("utf-8")
244244 if not line:
245245 break
246246 path = line[:-1]