[MERGE] Removed duplicate view.
[odoo/odoo.git] / addons / email_template / html2text.py
old mode 100644 (file)
new mode 100755 (executable)
index f8be00a..7453818
@@ -9,7 +9,7 @@ __contributors__ = ["Martin 'Joey' Schulze", "Ricardo Reyes", "Kevin Jay North"]
 #   Support decoded entities with unifiable.
 
 if not hasattr(__builtins__, 'True'): True, False = 1, 0
-import re, sys, urllib, htmlentitydefs, codecs, StringIO, types
+import re, sys, urllib, htmlentitydefs, codecs
 import sgmllib
 import urlparse
 sgmllib.charref = re.compile('&#([xX]?[0-9a-fA-F]+)[^0-9a-fA-F]')
@@ -444,12 +444,14 @@ if __name__ == "__main__":
             encoding = 'utf8'
             if len(sys.argv) > 2:
                 encoding = sys.argv[2]
-           f = open(arg, 'r')
-           try:
-                   data = f.read().decode(encoding)
-           finally:
-                   f.close()
+            f = open(arg, 'r')
+            try:
+                    data = f.read().decode(encoding)
+            finally:
+                    f.close()
     else:
         data = sys.stdin.read().decode('utf8')
     wrapwrite(html2text(data, baseurl))
 
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: