summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2015-12-18 02:49:42 +0100
committerjvoisin2015-12-18 02:49:42 +0100
commit31e1037fb6cbc2ee68a7c10ba322922aafc0d5ae (patch)
treed11f4ffde694af53aee2bb12a16914523032162c
parentca83fc0927897db30ed0ad11d3d681c3bd90c715 (diff)
Enhance CLI's error display by tweaking log level
-rw-r--r--libmat/archive.py4
-rw-r--r--libmat/mat.py2
-rw-r--r--libmat/strippers.py10
3 files changed, 8 insertions, 8 deletions
diff --git a/libmat/archive.py b/libmat/archive.py
index b635f99..61028ef 100644
--- a/libmat/archive.py
+++ b/libmat/archive.py
@@ -291,7 +291,7 @@ class TarStripper(GenericArchiveStripper):
291 elif isinstance(cfile, GenericArchiveStripper): 291 elif isinstance(cfile, GenericArchiveStripper):
292 ret_list.append(item.name) 292 ret_list.append(item.name)
293 else: 293 else:
294 logging.error("%s's format is not supported or harmless", item.name) 294 logging.info("%s's format is not supported or harmless", item.name)
295 if os.path.splitext(path)[1] not in parser.NOMETA: 295 if os.path.splitext(path)[1] not in parser.NOMETA:
296 if not list_unsupported: 296 if not list_unsupported:
297 return False 297 return False
@@ -317,7 +317,7 @@ class TarStripper(GenericArchiveStripper):
317 if meta: 317 if meta:
318 current_meta['file'] = str(meta) 318 current_meta['file'] = str(meta)
319 else: 319 else:
320 logging.error("%s's format is not supported or harmless", item.name) 320 logging.info("%s's format is not supported or harmless", item.name)
321 321
322 if not self.is_file_clean(item): # if there is meta 322 if not self.is_file_clean(item): # if there is meta
323 current_meta['mtime'] = item.mtime 323 current_meta['mtime'] = item.mtime
diff --git a/libmat/mat.py b/libmat/mat.py
index 1dc51d9..e84c717 100644
--- a/libmat/mat.py
+++ b/libmat/mat.py
@@ -16,7 +16,7 @@ __version__ = '0.5.4'
16__author__ = 'jvoisin' 16__author__ = 'jvoisin'
17 17
18# Silence 18# Silence
19LOGGING_LEVEL = logging.CRITICAL 19LOGGING_LEVEL = logging.ERROR
20fname = '' 20fname = ''
21 21
22# Verbose 22# Verbose
diff --git a/libmat/strippers.py b/libmat/strippers.py
index 5920c41..c170332 100644
--- a/libmat/strippers.py
+++ b/libmat/strippers.py
@@ -27,19 +27,19 @@ pdfSupport = True
27try: 27try:
28 from gi.repository import Poppler 28 from gi.repository import Poppler
29except ImportError: 29except ImportError:
30 logging.info('Unable to import Poppler: no PDF support') 30 logging.error('Unable to import Poppler: no PDF support')
31 pdfSupport = False 31 pdfSupport = False
32 32
33try: 33try:
34 import cairo 34 import cairo
35except ImportError: 35except ImportError:
36 logging.info('Unable to import python-cairo: no PDF support') 36 logging.error('Unable to import python-cairo: no PDF support')
37 pdfSupport = False 37 pdfSupport = False
38 38
39try: 39try:
40 import pdfrw 40 import pdfrw
41except ImportError: 41except ImportError:
42 logging.info('Unable to import python-pdfrw: no PDf support') 42 logging.error('Unable to import python-pdfrw: no PDf support')
43 pdfSupport = False 43 pdfSupport = False
44 44
45if pdfSupport: 45if pdfSupport:
@@ -56,7 +56,7 @@ try:
56 STRIPPERS['audio/ogg'] = mutagenstripper.OggStripper 56 STRIPPERS['audio/ogg'] = mutagenstripper.OggStripper
57 STRIPPERS['audio/mpeg'] = mutagenstripper.MpegAudioStripper 57 STRIPPERS['audio/mpeg'] = mutagenstripper.MpegAudioStripper
58except ImportError: 58except ImportError:
59 logging.info('Unable to import python-mutagen: limited audio format support') 59 logging.error('Unable to import python-mutagen: limited audio format support')
60 60
61# exiftool 61# exiftool
62try: 62try:
@@ -66,4 +66,4 @@ try:
66 STRIPPERS['image/png'] = exiftool.PngStripper 66 STRIPPERS['image/png'] = exiftool.PngStripper
67 STRIPPERS['image/tiff'] = exiftool.TiffStripper 67 STRIPPERS['image/tiff'] = exiftool.TiffStripper
68except OSError: 68except OSError:
69 logging.info('Unable to find exiftool: limited images support') 69 logging.error('Unable to find exiftool: limited images support')