change mind, don't use output dir since we need to know what inc files
authorMark J. Cox <mark@awe.com>
Mon, 29 Jan 2018 14:38:27 +0000 (14:38 +0000)
committerMark J. Cox <mark@awe.com>
Mon, 29 Jan 2018 14:38:27 +0000 (14:38 +0000)
we create, so we'll do that as an option later

bin/mk-cvepage

index d17e2c8139dadd56468a7abb97d773997cec945f..c8e9d1d423501de23fe3aaf3a31a741591edada6 100755 (executable)
@@ -48,12 +48,11 @@ def merge_affects(issue,base):
         
 parser = OptionParser()
 parser.add_option("-i", "--input", help="input vulnerability file live openssl-web/news/vulnerabilities.xml", dest="input")
-parser.add_option("-o", "--outdir", help="output directory to write html files", dest="outdir")
 (options, args) = parser.parse_args()
 
 # We need an output directory not stdout because we might write multiple files
-if not options.input or not options.outdir:
-   print "needs input file and output directory"
+if not options.input:
+   print "needs input file"
    parser.print_help()
    exit();
 
@@ -110,5 +109,5 @@ preface += ", ".join( "<a href=\"#y%s\">%s</a>" %(year,year) for year in allyear
 preface += "</p>"
 preface += allissues
 
-with codecs.open(options.outdir+"/vulnerabilities.inc","w","utf-8") as htmlfile:
-    htmlfile.write(preface)
+sys.stdout.write(preface.encode('utf-8'))
+