fix 'NoneType' object has no attribute 'scan_for_server' in rbt login/logout
Review Request #7794 — Created Dec. 3, 2015 and discarded
rbt login/logout commands crash if the server url is set in the SCM config
The rbt login and logout commands do not initialize the scm tool like other
commands do. This means that if the server url is set in the scm (through
.gitconfig for example), rather than the command line then login and logout
will crash with an AttributeError.
Tests pass except for the MercurialClient (+svn) tests, where I'm seeing this issue with hgsubversion: https://bitbucket.org/durin42/hgsubversion/issues/449/extension-breaks-mercurial-36-rc2
Additionally, it seems the MercurialClient (+svn) test failure will leave the suite in a bad state because all subsequent tests will fail with an OSError, but when run in isolation they pass just fine. The travis-ci build hit the same issue: https://travis-ci.org/reviewboard/rbtools/jobs/94449505
Change Summary:
Added description for testing done
Testing Done: |
|
---|
-
The fix seems like it'd work, but it feels like a bandaid for the real issue, which is that this is being called at all with a
None
value for the tool. That shouldn't be valid at all. Can you look at how we're getting to that state?Also, I'd like more info in the description (which we use as the commit message) as to the original problem being fixed and how it was caused.
Change Summary:
Update description
Description: |
|
---|
Change Summary:
Added docstring for get_server_url, make parameters optional
Diff: |
Revision 2 (+22 -3) |
---|