2503: Check at beginning of login() function in post-review 0.4 is wrong

roy.jean*********@gmai***** (Google Code) (Is this you? Claim this profile.)
Feb. 29, 2012
What version are you running?
RBTools 0.4

What's the URL of the page containing the problem?

What steps will reproduce the problem?
1. Call post-review with --username and --password.

What is the expected output? What do you see instead?
post-review fails with "Authentication information needs to be provided on the command line when using --diff-filename=-".

This exit path is incorrectly taken because the check at the beginning of the login() function has an operator precedence bug. It should be

        if (options.diff_filename == '-' and
            not (self.has_valid_cookie() or
             (options.username and options.password))):
#1 chipx86
We'll fix this and get a release out probably tonight.
  • +Confirmed
  • -Priority-Medium
  • +chipx86
#2 chipx86
Fixed in master (1fa3c44)

Waiting on another fix and then we'll do a release.
  • -Confirmed