Fix a couple problems in rbt post error handling.

Review Request #11142 — Created Aug. 18, 2020 and submitted

Information

RBTools
release-2.0.x

Reviewers

When rbt post encounters an error when creating the review request,
there were a couple problems that could manifest:

  • The code that attempted to handle the case of updating an existing
    review request on services that use changenums (perforce, plastic) was
    using an old variable name, causing a NameError.
  • The error message formatting for other types of APIErrors was
    passing the exception instance into force_unicode, which only
    accepts unicode or bytes. This has been changed to cast first to call
    the __str__ method.
  • Ran unit tests.
  • Smoke tested rbt post error handling.
Summary ID
Fix a couple problems in rbt post error handling.
When rbt post encounters an error when creating the review request, there were a couple problems that could manifest: - The code that attempted to handle the case of updating an existing review request on services that use changenums (perforce, plastic) was using an old variable name, causing a `NameError`. - The error message formatting for other types of `APIError`s was passing the exception instance into `force_unicode`, which only accepts unicode or bytes. This has been changed to cast first to call the `__str__` method. Testing Done: - Ran unit tests. - Smoke tested rbt post error handling. Fixes bug 4858.
56872210655fd685ddaea44461b6b5ffc8a389df
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (4e01cf8)