string.maketrans() now produces translation tables for bytes.translate() -- wrong module?
Fix all remaining instances that did bad things with the new str.translate().
diff --git a/Lib/urllib.py b/Lib/urllib.py
index a1e26f0..04fd50a 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -1420,7 +1420,6 @@
# Test program
def test(args=[]):
- import string
if not args:
args = [
'/etc/passwd',
@@ -1443,9 +1442,7 @@
fp = open(fn, 'rb')
data = fp.read()
del fp
- if '\r' in data:
- table = string.maketrans("", "")
- data = data.translate(table, "\r")
+ data = data.replace("\r", "")
print(data)
fn, h = None, None
print('-'*40)