diff --git a/osclib/accept_command.py b/osclib/accept_command.py index f935c872..2788d642 100644 --- a/osclib/accept_command.py +++ b/osclib/accept_command.py @@ -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) diff --git a/osclib/stagingapi.py b/osclib/stagingapi.py index 63b6e0f6..c3a35fe4 100644 --- a/osclib/stagingapi.py +++ b/osclib/stagingapi.py @@ -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: