tests/f
changeset 36948 0585337ea787
parent 36261 c69e78ef2b54
child 38364 06c85cbd6824
equal deleted inserted replaced
36947:3d0178bf1039 36948:0585337ea787
    59         facts = []
    59         facts = []
    60         if isfile:
    60         if isfile:
    61             if opts.type:
    61             if opts.type:
    62                 facts.append(b'file')
    62                 facts.append(b'file')
    63             if any((opts.hexdump, opts.dump, opts.md5, opts.sha1, opts.sha256)):
    63             if any((opts.hexdump, opts.dump, opts.md5, opts.sha1, opts.sha256)):
    64                 content = open(f, 'rb').read()
    64                 with open(f, 'rb') as fobj:
       
    65                     content = fobj.read()
    65         elif islink:
    66         elif islink:
    66             if opts.type:
    67             if opts.type:
    67                 facts.append(b'link')
    68                 facts.append(b'link')
    68             content = os.readlink(f)
    69             content = os.readlink(f)
    69         elif isstdin:
    70         elif isstdin: