summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorSeth Vidal <skvidal@fedoraproject.org>2008-02-05 16:36:45 -0500
committerSeth Vidal <skvidal@fedoraproject.org>2008-02-05 16:36:45 -0500
commit1e963e0ba196482d0ad58090d3ec16f3cc94a9af (patch)
treef084f634b64a6c88e1d4748d88601739b316fc7a /func
parenta9ecad95e33506b21c7b1a282b5c2fd4bfb693cf (diff)
downloadthird_party-func-1e963e0ba196482d0ad58090d3ec16f3cc94a9af.tar.gz
third_party-func-1e963e0ba196482d0ad58090d3ec16f3cc94a9af.tar.xz
third_party-func-1e963e0ba196482d0ad58090d3ec16f3cc94a9af.zip
fix that method
Diffstat (limited to 'func')
-rwxr-xr-xfunc/overlord/client.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/func/overlord/client.py b/func/overlord/client.py
index db33345..cf1009c 100755
--- a/func/overlord/client.py
+++ b/func/overlord/client.py
@@ -178,16 +178,17 @@ class Client(object):
# raise FuncClientError
ol_key = '%s/funcmaster.key' % self.config.cadir
ol_crt = '%s/funcmaster.crt' % self.config.cadir
+ myname = utils.get_hostname()
# maybe /etc/pki/func is a variable somewhere?
fd_key = '/etc/pki/func/%s.pem' % myname
fd_crt = '/etc/pki/func/%s.cert' % myname
self.ca = '%s/funcmaster.crt' % self.config.cadir
-
- if os.access(client_key, os.R_OK) and os.access(client_cert, os.R_OK)\
- and os.access(ca, os.R_OK):
- self.key = client_key
- self.cert = client_cert
- self.ca = ca
+ if client_key and client_cert and ca:
+ if (os.access(client_key, os.R_OK) and os.access(client_cert, os.R_OK)
+ and os.access(ca, os.R_OK)):
+ self.key = client_key
+ self.cert = client_cert
+ self.ca = ca
# otherwise fall through our defaults
elif os.access(ol_key, os.R_OK) and os.access(ol_crt, os.R_OK):
self.key = ol_key