Revision: 2509
Author: janne.t.harkonen
Date: Tue Feb 23 02:37:05 2010
Log: Accidentally overrid robot tag, outfile is mandatory
http://code.google.com/p/robotframework/source/detail?r=2509

Modified:
 /trunk/tools/fixml/fixml.py

=======================================
--- /trunk/tools/fixml/fixml.py Fri Feb 19 02:05:53 2010
+++ /trunk/tools/fixml/fixml.py Tue Feb 23 02:37:05 2010
@@ -17,7 +17,7 @@

 """fixml.py -- A tool to fix broken Robot Framework output files

-Usage:  fixml.py inpath [outpath]
+Usage:  fixml.py inpath outpath

This tool can fix Robot Framework output files that are not properly finished
 or are missing elements from the middle. It should be possible to generate
@@ -26,8 +26,6 @@
 The tool uses BeautifulSoup module which must be installed separately.
 See http://www.crummy.com/software/BeautifulSoup for more information.
Additionally, the tool is only compatible with Robot Framework 2.1.3 or newer.
-
-If `outpath` is not given, the file is fixed in-place.
 """

 import sys
@@ -60,8 +58,8 @@

     def unknown_starttag(self, name, attrs, selfClosing=0):
         if name == 'robot':
-            attrs = [ (name, name == 'generator' and 'fixml.py' or value)
-                      for name, value in attrs ]
+            attrs = [ (key, key == 'generator' and 'fixml.py' or value)
+                      for key, value in attrs ]
         if self.__close_on_open:
             self._popToTag(self.__close_on_open)
             self.__close_on_open = None
@@ -75,9 +73,7 @@
             self.__close_on_open = None


-def main(inpath, outpath=None):
-    if not outpath:
-        outpath = inpath
+def main(inpath, outpath):
     outfile = open(outpath, 'w')
     outfile.write(str(Fixxxer(open(inpath))))
     outfile.close()

Reply via email to