Blob Blame History Raw
From df33dac0b489db80c5a51705550bf53146c1d57b Mon Sep 17 00:00:00 2001
From: David Trowbridge <trowbrds@gmail.com>
Date: Fri, 25 Apr 2014 13:25:25 -0700
Subject: [PATCH 6/8] Fix perforce options access.

Not all rbt commands add the perforce command-line options, but the p4client
was accessing them as if they did. Trivial fix.
---
 rbtools/clients/perforce.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rbtools/clients/perforce.py b/rbtools/clients/perforce.py
index 06ef6e49aead546a63d844560e9f3893f7d5bcd0..4f67264d590df81201f934d97164f7d823996286 100644
--- a/rbtools/clients/perforce.py
+++ b/rbtools/clients/perforce.py
@@ -98,13 +98,13 @@ class P4Wrapper(object):
         if marshalled:
             cmd += ['-G']
 
-        if self.options.p4_client:
+        if getattr(self.options, 'p4_client', None):
             cmd += ['-c', self.options.p4_client]
 
-        if self.options.p4_port:
+        if getattr(self.options, 'p4_port', None):
             cmd += ['-p', self.options.p4_port]
 
-        if self.options.p4_passwd:
+        if getattr(self.options, 'p4_passwd', None):
             cmd += ['-P', self.options.p4_passwd]
 
         cmd += p4_args
-- 
1.9.0