Fixed two minor errors.

This commit is contained in:
Jack Jansen 1995-10-04 16:36:53 +00:00
parent 685e16d7d6
commit 5a49ffca5e
1 changed files with 2 additions and 2 deletions

View File

@ -43,10 +43,10 @@ def encode(in_file, out_file, name=None, mode=None):
in_file = sys.stdin in_file = sys.stdin
elif type(in_file) == type(''): elif type(in_file) == type(''):
if name == None: if name == None:
name = basename(in_file) name = os.path.basename(in_file)
if mode == None: if mode == None:
try: try:
mode = os.path.stat(in_file)[0] mode = os.stat(in_file)[0]
except AttributeError: except AttributeError:
pass pass
in_file = open(in_file, 'rb') in_file = open(in_file, 'rb')