osclib/stagingapi: rename cstaging_nocleanup to cnocleanup_packages.

The previous name is inconsistent and did not work with general lazy laod.
This commit is contained in:
Jimmy Berry 2018-03-07 15:44:16 -06:00
parent e3168d6c34
commit d790a2ce69
2 changed files with 2 additions and 11 deletions

View File

@ -154,7 +154,7 @@ class AcceptCommand(object):
return False
pkglist = self.api.list_packages(project)
clean_list = set(pkglist) - set(self.api.cstaging_nocleanup)
clean_list = set(pkglist) - set(self.api.cnocleanup_packages)
for package in clean_list:
print "[cleanup] deleted %s/%s" % (project, package)

View File

@ -67,7 +67,6 @@ class StagingAPI(object):
self.project = project
# Store some prefix / data used in the code.
self._cstaging_nocleanup = None
self.user = conf.get_apiurl_usr(apiurl)
self.delreq_review = conf.config[project]['delreq-review']
self.main_repo = conf.config[project]['main-repo']
@ -98,7 +97,7 @@ class StagingAPI(object):
# This will intentionally cause error if key does not exists.
value = conf.config[self.project][key]
if key.endswith('archs'):
if key.endswith('archs') or key == 'nocleanup-packages':
value = value.split()
# This code will only be called for the first access.
@ -108,14 +107,6 @@ class StagingAPI(object):
# Raise AttributeError like normal.
return self.__getattribute__(attr)
@property
def cstaging_nocleanup(self):
"""Lazy-load value to allow for placement in remote config."""
if self._cstaging_nocleanup is None:
self._cstaging_nocleanup = conf.config[self.project]['nocleanup-packages'].split()
return self._cstaging_nocleanup
@property
def ring_packages(self):
if self._ring_packages is None: