ReproNim / reproman

ReproMan (AKA NICEMAN, AKA ReproNim TRD3)
https://reproman.readthedocs.io
Other
24 stars 14 forks source link

BF: exception cannot be logged, preceding debug() already logs its exc_str #422

Closed yarikoptic closed 5 years ago

yarikoptic commented 5 years ago
$> REPROMAN_LOGLEVEL=1 python -c 'from reproman import lgr; lgr.debug(ValueError("kaboom"))'
2019-05-23 13:49:11,631 [Level 5] Instantiating config
2019-05-23 13:49:11,638 [DEBUG  ] Reading files: ['/etc/reproman/reproman.cfg', '/etc/xdg/reproman/reproman.cfg', '/home/yoh/.config/reproman/reproman.cfg', '.reproman/reproman.cfg']
2019-05-23 13:49:11,642 [Level 5] Done importing main __init__
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.7/logging/__init__.py", line 1034, in emit
    msg = self.format(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 880, in format
    return fmt.format(record)
  File "/home/yoh/proj/repronim/reproman/reproman/log.py", line 141, in format
    if record.msg.startswith('| '):
AttributeError: 'ValueError' object has no attribute 'startswith'
Call stack:
  File "<string>", line 1, in <module>
Message: ValueError('kaboom')
Arguments: ()
2019-05-23 13:49:11,644 [Level 5] Exiting
codecov[bot] commented 5 years ago

Codecov Report

Merging #422 into master will decrease coverage by <.01%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #422      +/-   ##
==========================================
- Coverage   89.83%   89.83%   -0.01%     
==========================================
  Files         148      148              
  Lines       11692    11691       -1     
==========================================
- Hits        10504    10503       -1     
  Misses       1188     1188
Impacted Files Coverage Δ
reproman/distributions/singularity.py 94.66% <ø> (-0.08%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e7ad4a0...817a12d. Read the comment docs.