Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1431

Replace Try, Except, Pass with contextlib.suppress()

    XMLWordPrintable

    Details

    • Type: Clean up
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.0.1
    • Component/s: Framework

      Description

      Using bandit -r nxdrive highliths several small issues:

      >> Issue: [B110:try_except_pass] Try, Except, Pass detected.
         Severity: Low   Confidence: High
         Location: nxdrive/client/local_client.py:619
         More Info: https://bandit.readthedocs.io/en/latest/plugins/b110_try_except_pass.html
      618                     _, _, _, retcode = exc.args
      619                 except:
      620                     pass
      

      A simple fix is to use contexlib.suppress().

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m