SPECS: spec_utf8 - cosmetic

wiget wiget at pld-linux.org
Sun Feb 11 16:34:05 CET 2007


Author: wiget                        Date: Sun Feb 11 15:34:05 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- cosmetic

---- Files affected:
SPECS:
   spec_utf8 (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: SPECS/spec_utf8
diff -u SPECS/spec_utf8:1.9 SPECS/spec_utf8:1.10
--- SPECS/spec_utf8:1.9	Sun Feb 11 16:31:04 2007
+++ SPECS/spec_utf8	Sun Feb 11 16:34:00 2007
@@ -73,9 +73,10 @@
     # %description start
     r = re_desc.match(l)
     if r:
-      (enc, pure_lang) = find_encoding(r.group(2))
+      lang = r.group(2)
+      (enc, pure_lang) = find_encoding(lang)
       if enc == None:
-        outfile.write("#spec_utf8: unknown lang code in %%description -l %s\n" % (r.group(2)))
+        outfile.write("#spec_utf8: unknown lang code in %%description -l %s\n" % (lang))
 	success = False
       elif not re_utf.search(enc):
         in_desc = True
@@ -89,7 +90,7 @@
           try:
             outline = unicode(l, enc).encode("UTF-8")
           except UnicodeDecodeError:
-            outfile.write("#spec_utf8: transcoding error %%description -l %s\n" % (r.group(2)))
+            outfile.write("#spec_utf8: transcoding error %%description -l %s\n" % (pure_lang))
 	    success = False
     elif in_changelog:
       try:
@@ -104,16 +105,17 @@
       # Summary
       r = re_summary.match(l)
       if r:
-        (enc, pure_lang) = find_encoding(r.group(1))
+        lang = r.group(1)
+        (enc, pure_lang) = find_encoding(lang)
         if enc == None:
-          outfile.write("#spec_utf8: unknow lang code Summary(%s)\n" % (r.group(1)))
+          outfile.write("#spec_utf8: unknow lang code Summary(%s)\n" % (lang))
 	  success = False
         elif not re_utf.search(enc):
           try:
             desc = unicode(r.group(2), enc).encode("UTF-8")
             outline = "Summary(%s.UTF-8):   %s\n" % (pure_lang, desc)
           except UnicodeDecodeError:
-            outfile.write("#spec_utf8: ranscoding error Summary(%s)\n" % (r.group(1)))
+            outfile.write("#spec_utf8: transcoding error Summary(%s)\n" % (lang))
 	    success = False
       elif re_changelog.match(l):
         # %changelog start
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/spec_utf8?r1=1.9&r2=1.10&f=u



More information about the pld-cvs-commit mailing list