Commit 8e3ed3f9 by heffnercj

Core functionality works in python3; removed hacky python2 stuff from setup.py

parent 542b4701
...@@ -584,8 +584,8 @@ def main(): ...@@ -584,8 +584,8 @@ def main():
pass pass
except IOError: except IOError:
pass pass
# except Exception, e: except Exception as e:
# print "Unexpected error:", str(e) print("Unexpected error: %s" % str(e))
bwalk.cleanup() bwalk.cleanup()
......
...@@ -133,29 +133,3 @@ setup( name = "binwalk", ...@@ -133,29 +133,3 @@ setup( name = "binwalk",
scripts = ["bin/binwalk"], scripts = ["bin/binwalk"],
) )
# THIS BREAKS WHEN INSTALLING WITH PYTHON3; PROPER PYTHON3 SUPPORT IS IN PROGRESS.
# If python2 exists, replace the shebang to invoke python2.
# This prevents python3 from being used when running binwalk.
# This shouldn't be done on the ./bin/binwalk file, as that would
# cause a conflict between the master branch and the local clone.
#python2_path = which("python2")
#binwalk_path = which("binwalk")
#if python2_path and binwalk_path:
# i = 0
# data = ''
# for line in open(binwalk_path, 'rb').readlines():
# if i == 0:
# line = "#!/usr/bin/env python2\n"
# data += str(line)
# i += 1
# fd = open(binwalk_path, 'wb')
# try:
# fd.write(data)
# except TypeError:
# fd.write(bytes(data, 'UTF-8'))
# fd.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment