From: Zack Cerza Date: Tue, 7 Jun 2016 15:40:00 +0000 (-0600) Subject: pcp: Use a smarter check for archive presence X-Git-Tag: 1.1.0~605^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2653548f5f5335ff1639cb6569954f8a0954e822;p=teuthology.git pcp: Use a smarter check for archive presence If ctx.archive was set, but to None, we were failing. Signed-off-by: Zack Cerza --- 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(