Преглед на файлове

[indexer] dateutil.parse only throws ValueError or OverflowError

This also cuts down on the log noise when the indexer tries to guess
the type of a value.
Erick Tryzelaar преди 10 години
родител
ревизия
bc2f0ac
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      desktop/libs/indexer/src/indexer/utils.py

+ 1 - 2
desktop/libs/indexer/src/indexer/utils.py

@@ -131,8 +131,7 @@ def get_field_types(field_list, iterations=3):
 
     try:
       parse(value)
-    except:
-      LOG.exception('failed to parse value %s' % value)
+    except OverflowError:
       raise ValueError()
 
   def test_int(value):