From aa42b905d5c0131011a38335c7da2922ba9eebf3 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 8 Jun 2018 23:30:12 +0200 Subject: [PATCH] Speed up a bit the processing of get_meta for images with a "regular" name --- libmat2/images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmat2/images.py b/libmat2/images.py index fe700d2..0b85cde 100644 --- a/libmat2/images.py +++ b/libmat2/images.py @@ -32,7 +32,7 @@ class __ImageParser(abstract.AbstractParser): of this. """ fun = lambda f: subprocess.check_output(['/usr/bin/exiftool', '-json', f]) - if not re.match('^[a-z0-9]', self.filename): + if re.search('^[a-z0-9]', self.filename) is None: out = self.__handle_problematic_filename(self.filename, fun) else: out = fun(self.filename)