• 
      

    Fix WebAPIError.with_message, and add WebAPIError.with_override.

    Review Request #4622 — Created Sept. 21, 2013 and submitted

    Information

    Djblets
    master

    Reviewers

    Fix WebAPIError.with_message, and add WebAPIError.with_override.

    WebAPIError.with_message modified the main instance of an error, instead
    of creating a copy. This led to pollution of the error instances. In
    practice, Djblets and Review Board aren't bit by it, by this may change
    over time. Now it creates a copy.

    Since it's also useful to override headers, a new with_override function
    has been added that takes message and headers. with_message now just
    wraps this.

    New unit tests pass.

    reviewbot
    1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      djblets/webapi/errors.py
      djblets/webapi/tests.py
      Ignored Files:

    2. 
        
    reviewbot
    1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
      djblets/webapi/errors.py
      djblets/webapi/tests.py
      Ignored Files:

    2. 
        
    SM
    1. Ship It!

    2. 
        
    chipx86
    Review request changed
    Status:
    Completed