From 458f496ca27c4ee2eea9fb044d08d439b4a331de Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jun 26 2019 09:34:22 +0000 Subject: remove deprecated BuildRoot.uploadDir() Fixes: https://pagure.io/koji/issue/1455 --- diff --git a/builder/kojid b/builder/kojid index d4504eb..ec03ba3 100755 --- a/builder/kojid +++ b/builder/kojid @@ -519,23 +519,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'])