Skip to content

Commit

Permalink
AptSources now returns components as list instead of set to maintain …
Browse files Browse the repository at this point in the history
…order (#1199)

* AptSources now returns components as list instead of set to make updates possible

* fixed lint errors
  • Loading branch information
rsfzi authored Sep 25, 2024
1 parent 3274988 commit f4361ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyinfra/facts/apt.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def parse_apt_repo(name):
"type": matches.group(1),
"url": matches.group(3),
"distribution": matches.group(4),
"components": set(matches.group(5).split()),
"components": list(matches.group(5).split()),
}


Expand Down
2 changes: 1 addition & 1 deletion tests/operations/apt.repo/add_existing.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "deb",
"url": "http://archive.canonical.com/ubuntu",
"distribution": "hardy",
"components": ["set:", "partner"],
"components": ["partner"],
"options": {}
}]
},
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/apt.repo/remove.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "deb",
"url": "http://archive.canonical.com/ubuntu",
"distribution": "hardy",
"components": ["set:", "partner"],
"components": ["partner"],
"options": {}
}],
"files.FindInFile": {
Expand Down

0 comments on commit f4361ff

Please sign in to comment.