From c118f87ecda2ffa10e359d75a42c78832586c6cf Mon Sep 17 00:00:00 2001 From: saville Date: Mon, 21 Aug 2023 12:03:14 -0600 Subject: [PATCH] Fix pushing for pypi builds --- buildrunner/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/buildrunner/__init__.py b/buildrunner/__init__.py index e33f19be..901b86a0 100644 --- a/buildrunner/__init__.py +++ b/buildrunner/__init__.py @@ -651,11 +651,11 @@ def run(self): # pylint: disable=too-many-statements,too-many-branches,too-many else: self.log.write(str(msg) + '\n') - # Push to pypi repositories - # Placing the import here avoids the dependency when pypi is not needed - import twine.commands.upload # pylint: disable=import-outside-toplevel - for _, _items in self.pypi_packages.items(): - twine.commands.upload.upload(_items['upload_settings'], _items['packages']) + # Push to pypi repositories + # Placing the import here avoids the dependency when pypi is not needed + import twine.commands.upload # pylint: disable=import-outside-toplevel + for _, _items in self.pypi_packages.items(): + twine.commands.upload.upload(_items['upload_settings'], _items['packages']) else: self.log.write( '\nPush not requested\n'