mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31: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:
@@ -1034,7 +1034,7 @@ class NmapParserSAX(ParserBasics, ContentHandler):
|
||||
def write_xml_to_file(self, filename):
|
||||
"""Write the XML representation of this scan to the file whose name is
|
||||
given."""
|
||||
fd = open(filename, "wb")
|
||||
fd = open(filename, "w")
|
||||
self.write_xml(fd)
|
||||
fd.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user