Closed
Description
Issue
P4 polling with tickets uses the p4 login -p
command and expect 3 lines or more on stdout, the third line being the ticket number.
However, with my version of the CLI tools from Perforce:
$ p4 -V
Rev. P4/LINUX26X86_64/2018.2/1740258 (2018/12/11).
the ticket number appears on the 2nd line! (and there are therefore only 2 lines of stdout):
$ p4 login -p
Enter password:
D25B979...3741E
Patch
Here is my proposed patch:
--- buildbot/changes/p4poller.py 2019-01-29 18:30:41.596740370 -0800
+++ buildbot/changes/p4poller.py 2019-01-28 17:23:42.110348463 -0800
@@ -200,7 +200,9 @@
def _parseTicketPassword(self, text):
- lines = text.split("\n")
+ lines = text.splitlines()
- if len(lines) < 3:
- return None
- return lines[2].strip()
+ return lines[-1].strip()
def _getPasswd(self):
if self.use_tickets:
To make it short: I just pick the last line of stdout
no matter the number of lines.
I'm not sure if that works on all p4
versions, and I fell that is not the best way of doing this.
Version found
Buildbot 1.8.0
Python 2.7.15rc1 & Python 3.6.5
Activity
aisoard commentedon Feb 20, 2019
Fixed.