mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 05:01:29 +00:00
Fix encoding issues related to Python 3 upgrade.
Python 3 str() is a unicode already, so can't be decoded. subprocess.Popen needs to be in text mode (universal_newlines is the oldest compatible kwarg for this) in order to do line-based buffering. In general, all the filesystem encoding stuff we were doing is done by Python itself now.
This commit is contained in:
@@ -89,7 +89,7 @@ def update_date(base_dir):
|
||||
|
||||
def update_version(base_dir, version):
|
||||
print(">>> Updating %s" % os.path.join(base_dir, VERSION))
|
||||
vf = open(os.path.join(base_dir, VERSION), "wb")
|
||||
vf = open(os.path.join(base_dir, VERSION), "w")
|
||||
print(version, file=vf)
|
||||
vf.close()
|
||||
print(">>> Updating %s" % os.path.join(base_dir, VERSION_PY))
|
||||
|
||||
Reference in New Issue
Block a user