Explorar el Código

[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 hace 10 años
padre
commit
bc2f0acab9
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  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):