Add NoneType check for revisions in Perforce get_changenum().

Review Request #8133 — Created April 28, 2016 and submitted — Latest diff uploaded

Information

RBTools
master
6358738...

Reviewers

When posting a diff of a range of submitted changelists, rbt post command fails with teh following Traceback:
rbt post --repository=Perforce //a/b/c/...@23,@28

File "/usr/local/bin/rbt", line 9, in <module>
load_entry_point('RBTools==0.7.6', 'console_scripts', 'rbt')()
File "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.6-py2.7.egg/rbtools/commands/main.py", line 133, in main
command.run_from_argv([RB_MAIN, command_name] + args)
File "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.6-py2.7.egg/rbtools/commands/init.py", line 629, in run_from_argv
exit_code = self.main(*args) or 0
File "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.6-py2.7.egg/rbtools/commands/post.py", line 767, in main
changenum = self.tool.get_changenum(self.revisions)
File "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.6-py2.7.egg/rbtools/clients/perforce.py", line 666, in get_changenum
tip = revisions['tip']
TypeError: 'NoneType' object has no attribute 'getitem'

This is because the range of revisions does not associate with a single changelist.
Adding a NoneType check for revisions in Perforce get_changenum() fixes it.

Manual Testing:
Uploaded / updated Perforce reviews.