From 73d8097b3d63dcc0aba41cef3f7bdcf0459ae8ee Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Tue, 28 Mar 2017 16:58:51 -0700 Subject: Fix test issues Signed-off-by: Joffrey F --- docker/utils/fnmatch.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'docker/utils/fnmatch.py') diff --git a/docker/utils/fnmatch.py b/docker/utils/fnmatch.py index 80bdf77..e95b63c 100644 --- a/docker/utils/fnmatch.py +++ b/docker/utils/fnmatch.py @@ -39,15 +39,13 @@ def fnmatch(name, pat): If you don't want this, use fnmatchcase(FILENAME, PATTERN). """ - import os - name = os.path.normcase(name) - pat = os.path.normcase(pat) + name = name.lower() + pat = pat.lower() return fnmatchcase(name, pat) def fnmatchcase(name, pat): """Test whether FILENAME matches PATTERN, including case. - This is a version of fnmatch() which doesn't case-normalize its arguments. """ @@ -67,7 +65,6 @@ def translate(pat): There is no way to quote meta-characters. """ - recursive_mode = False i, n = 0, len(pat) res = '' @@ -100,7 +97,7 @@ def translate(pat): stuff = '\\' + stuff res = '%s[%s]' % (res, stuff) elif recursive_mode and c == '/': - res = res + '/?' + res = res + re.escape(c) + '?' else: res = res + re.escape(c) return res + '\Z(?ms)' -- cgit v1.2.1