This commit is contained in:
Miroslav Stampar
2018-08-10 14:16:27 +02:00
parent a296d22195
commit 2e017eee99
3 changed files with 4 additions and 4 deletions

View File

@@ -674,7 +674,7 @@ def _createTargetDirs():
conf.outputPath = getUnicode(conf.outputPath)
try:
with codecs.open(os.path.join(conf.outputPath, "target.txt"), "w+", UNICODE_ENCODING) as f:
with openFile(os.path.join(conf.outputPath, "target.txt"), "w+") as f:
f.write(kb.originalUrls.get(conf.url) or conf.url or conf.hostname)
f.write(" (%s)" % (HTTPMETHOD.POST if conf.data else HTTPMETHOD.GET))
f.write(" # %s" % getUnicode(subprocess.list2cmdline(sys.argv), encoding=sys.stdin.encoding))