encoding.upper: factor out fallback code
authorSiddharth Agarwal <sid0@fb.com>
Wed, 01 Apr 2015 00:30:41 -0700
changeset 24597 b4258d5a1600
parent 24596 75ea27f1711d
child 24598 22f49c7dd11b
encoding.upper: factor out fallback code This will be used as the fallback function on Windows.
mercurial/encoding.py
--- 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")