From 2653548f5f5335ff1639cb6569954f8a0954e822 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 7 Jun 2016 09:40:00 -0600 Subject: [PATCH] pcp: Use a smarter check for archive presence If ctx.archive was set, but to None, we were failing. Signed-off-by: Zack Cerza --- teuthology/task/pcp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teuthology/task/pcp.py b/teuthology/task/pcp.py index 0c384b97e0..6f61311bc7 100644 --- a/teuthology/task/pcp.py +++ b/teuthology/task/pcp.py @@ -256,7 +256,7 @@ class PCP(Task): ) def setup_graphite(self, hosts): - if not hasattr(self.ctx, 'archive'): + if not getattr(self.ctx, 'archive', None): self.use_graphite = False if self.use_graphite: out_dir = os.path.join( @@ -275,7 +275,7 @@ class PCP(Task): ) def setup_archive(self, hosts): - if not hasattr(self.ctx, 'archive'): + if not getattr(self.ctx, 'archive', None): self.fetch_archives = False if self.fetch_archives: self.archiver = PCPArchive( -- 2.39.5