summaryrefslogtreecommitdiffstats
path: root/Lib/uu.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/uu.py')
-rwxr-xr-xLib/uu.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/uu.py b/Lib/uu.py
index 18a9f79..da096ea 100755
--- a/Lib/uu.py
+++ b/Lib/uu.py
@@ -46,7 +46,7 @@ def encode(in_file, out_file, name=None, mode=None):
#
if in_file == '-':
in_file = sys.stdin.buffer
- elif isinstance(in_file, basestring):
+ elif isinstance(in_file, str):
if name is None:
name = os.path.basename(in_file)
if mode is None:
@@ -60,7 +60,7 @@ def encode(in_file, out_file, name=None, mode=None):
#
if out_file == '-':
out_file = sys.stdout.buffer
- elif isinstance(out_file, basestring):
+ elif isinstance(out_file, str):
out_file = open(out_file, 'wb')
#
# Set defaults for name and mode
@@ -87,7 +87,7 @@ def decode(in_file, out_file=None, mode=None, quiet=0):
#
if in_file == '-':
in_file = sys.stdin.buffer
- elif isinstance(in_file, basestring):
+ elif isinstance(in_file, str):
in_file = open(in_file, 'rb')
#
# Read until a begin is encountered or we've exhausted the file
@@ -118,7 +118,7 @@ def decode(in_file, out_file=None, mode=None, quiet=0):
opened = False
if out_file == '-':
out_file = sys.stdout.buffer
- elif isinstance(out_file, basestring):
+ elif isinstance(out_file, str):
fp = open(out_file, 'wb')
try:
os.path.chmod(out_file, mode)
@@ -169,7 +169,7 @@ def test():
if options.decode:
if options.text:
- if isinstance(output, basestring):
+ if isinstance(output, str):
output = open(output, 'wb')
else:
print(sys.argv[0], ': cannot do -t to stdout')
@@ -177,7 +177,7 @@ def test():
decode(input, output)
else:
if options.text:
- if isinstance(input, basestring):
+ if isinstance(input, str):
input = open(input, 'rb')
else:
print(sys.argv[0], ': cannot do -t from stdin')