#
# -------------------------------------------------------------------------
import json
-import io
import os
import platform
import sys
"""
Reads the local file
"""
- with io.open(filename, 'r', encoding='utf-8') as f:
+ with open(filename, 'r', encoding='utf-8') as f:
self.contents = f.readlines()
self.date = self.findDate(self.contents)
return (None, None)
if raw_output is False:
print("Scanning for autoload path in %s" % library)
- scanfile = io.open(library, 'rb')
+ scanfile = open(library, 'rb')
scanelf = ReadElf(scanfile, sys.stdout)
except AttributeError:
# Not a dynamic binary
runpath + ":" + ldlibpath +
":/usr/lib64:/lib64:/usr/lib:/lib")
if library is not None:
- with io.open(library, 'rb') as file:
+ with open(library, 'rb') as file:
try:
libelf = ReadElf(file, sys.stdout)
except ELFError:
scan_autoload_path(dpath)
if os.path.isfile(dpath):
try:
- file = io.open(dpath, 'rb')
+ file = open(dpath, 'rb')
readelf = ReadElf(file, sys.stdout)
except ELFError:
# this is likely not an elf file, skip it
print("Must specify a file name")
return
- file = io.open(dpdk_path, 'rb')
+ file = open(dpdk_path, 'rb')
try:
readelf = ReadElf(file, sys.stdout)
except ElfError:
print("File not found")
sys.exit(1)
- with io.open(myelffile, 'rb') as file:
+ with open(myelffile, 'rb') as file:
try:
readelf = ReadElf(file, sys.stdout)
readelf.process_dt_needed_entries()