changeset 24597:b4258d5a1600

encoding.upper: factor out fallback code This will be used as the fallback function on Windows.
author Siddharth Agarwal <sid0@fb.com>
date Wed, 01 Apr 2015 00:30:41 -0700
parents 75ea27f1711d
children 22f49c7dd11b
files mercurial/encoding.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/encoding.py	Wed Apr 01 00:29:22 2015 -0700
+++ b/mercurial/encoding.py	Wed Apr 01 00:30:41 2015 -0700
@@ -338,7 +338,9 @@
     try:
         return asciiupper(s)
     except UnicodeDecodeError:
-        pass
+        return upperfallback(s)
+
+def upperfallback(s):
     try:
         if isinstance(s, localstr):
             u = s._utf8.decode("utf-8")