Skip to content

Commit f8557e4

Browse files
authored
operations.util.packaging: allow empty package list in ensure_packages
1 parent 82e580b commit f8557e4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pyinfra/operations/util/packaging.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ def ensure_packages(
172172
return
173173
if isinstance(packages_to_ensure, str):
174174
packages_to_ensure = [packages_to_ensure]
175+
if len(packages_to_ensure) == 0:
176+
return
175177

176178
packages: list[PkgInfo] = []
177179
if isinstance(packages_to_ensure[0], PkgInfo):

0 commit comments

Comments
 (0)