fixed bug variable is_rr_approved referenced b4 assigned

Review Request #7923 — Created Jan. 30, 2016 and discarded

Information

RBTools
release-0.7.x

Reviewers

Moved the code inside finally block out, so is_rr_approved is referenced after the whole try/except block.

I did some manual testing on reviews requests that are shipped and not shipped.

The code passes all existing unit tests.

Description From Last Updated

This isn't quite the right fix, though it's close. We want to keep this test for AttributeError, since it's handling …

daviddavid
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbtools/commands/land.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbtools/commands/land.py
    
    
  2. 
      
david
  1. 
      
  2. rbtools/commands/land.py (Diff revision 1)
     
     

    This isn't quite the right fix, though it's close.

    We want to keep this test for AttributeError, since it's handling the specific case of the server being old and not having the approved or approval_failure attributes.

    Instead, move the code from the finally block out of finally so that it runs after the whole try/except block and before the if is_local check. That way any uncaught exceptions from the try will just raise up further and be handled by the top-level logger.

  3. 
      
david
  1. Also, please see https://www.reviewboard.org/docs/codebase/dev/writing-good-descriptions/ for tips on formatting your summary/description/testing done.

  2. 
      
XI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/commands/land.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/commands/land.py
    
    
  2. 
      
david
  1. Your summary needs work (no abbreviations like "b4", proper grammar/capitalization). The description should also explain what the problem was, not just your solution to it.

    Finally, please add the bug number into the "Bugs" field

  2. 
      
david
Review request changed

Status: Discarded

Loading...