From a1fbe6d1524233b8c0e60b95ff78f289d91b018f Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Aug 12 2019 21:58:36 +0000 Subject: PR#1511: remove deprecated BuildRoot.uploadDir() Merges #1511 https://pagure.io/koji/pull-request/1511 Fixes: #1455 https://pagure.io/koji/issue/1455 remove BuildRoot.uploadDir() --- diff --git a/builder/kojid b/builder/kojid index 3f84887..142a440 100755 --- a/builder/kojid +++ b/builder/kojid @@ -526,23 +526,6 @@ class BuildRoot(object): the hub.""" return koji.pathinfo.taskrelpath(self.task_id) - def uploadDir(self, dirpath, suffix=None): - """Upload the contents of the given directory to the - task output directory on the hub. If suffix is provided, - append '.' + suffix to the filenames, so that successive uploads - of the same directory won't overwrite each other, if the files have - the same name but different contents.""" - koji.util.deprecated('BuildRoot.uploadDir method is deprecated and will be removed in 1.19') - if not os.path.isdir(dirpath): - return - uploadpath = self.getUploadPath() - for filename in os.listdir(dirpath): - filepath = os.path.join(dirpath, filename) - if os.stat(filepath).st_size > 0: - if suffix: - filename = '%s.%s' % (filename, suffix) - self.session.uploadWrapper(filepath, uploadpath, filename) - def init(self): rv = self.mock(['--init'])