tests/f
changeset 36954 0585337ea787
parent 36294 c69e78ef2b54
child 38370 06c85cbd6824
equal deleted inserted replaced
36953:3d0178bf1039 36954: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: