Vauxoo / pylint-odoo

1 stars 4 forks source link

[ADD] except-pass: Emit message If a "except:pass" is used #106

Closed JesusZapata closed 7 years ago

JesusZapata commented 7 years ago

The pass into block except is not a good practice!

By including the pass we assume that our algorithm can continue to function after the exception occurred

If you really need to use the pass consider logging that exception

      try:
          sentences
      except:
          pass
          _logger.debug('Pass')

Referring to https://github.com/Vauxoo/pylint-odoo/issues/101

moylop260 commented 7 years ago

Your commit message could be: [ADD] except-pass: Emit message If a "except:pass" is used

JesusZapata commented 7 years ago

@moylop260 I changed the title of this PR and first commit message!

moylop260 commented 7 years ago

Could you check the travis red?

JesusZapata commented 7 years ago

@moylop260 Done! Fix pep8 visual identation!

moylop260 commented 7 years ago

WIP from https://github.com/OCA/pylint-odoo/pull/107