micro-optimization
authorMagnus Hagander <magnus@hagander.net>
Thu, 21 Jun 2012 15:41:38 +0000 (17:41 +0200)
committerMagnus Hagander <magnus@hagander.net>
Thu, 21 Jun 2012 15:41:38 +0000 (17:41 +0200)
loader/lib/parser.py

index c74ffd55d7c4261352c161cfe53a990f10850a73..74388b7731fcf9d6839f4c45713d61d6bd510250 100644 (file)
@@ -55,15 +55,15 @@ class ArchivesParser(object):
                if charset.lower() == 'unknown-8bit':
                        # Special case where we don't know... We'll assume
                        # us-ascii and use replacements
-                       charset = 'us-ascii'
+                       return 'us-ascii'
                if charset.lower() == 'x-gbk':
                        # Some MUAs set it to x-gbk, but there is a valid
                        # declaratoin as gbk...
-                       charset = 'gbk'
+                       return 'gbk'
                if charset.lower() == 'iso-8859-8-i':
                        # -I is a special logical version, but should be the
                        # same charset
-                       chaset = 'iso-8859-8'
+                       return 'iso-8859-8'
                return charset
 
        def get_payload_as_unicode(self, msg):