Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | From 23c5b15efe42e5e6ee695e54798bac248532d8d6 Mon Sep 17 00:00:00 2001 |
| 2 | |
| 3 | Date: Tue, 28 May 2019 13:14:51 +0200 |
| 4 | Subject: [oe-core][PATCH 1/1] Fix SyntaxWarning: "is" with a literal. Did you |
| 5 | mean "=="? |
| 6 | |
| 7 | --- |
| 8 | dnf/cli/commands/repoquery.py | 2 +- |
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 10 | --- |
| 11 | |
| 12 | Unchanged. Appears in version 4.2.7. |
| 13 | |
| 14 | Upstream-Status: Backport [git://github.com/rpm-software-management/dnf.git] |
| 15 | |
| 16 | Signed-off-by: Joe Slater <joe.slater@windriver.com> |
| 17 | |
| 18 | |
| 19 | diff --git a/dnf/cli/commands/repoquery.py b/dnf/cli/commands/repoquery.py |
| 20 | index 941a470..63fc668 100644 |
| 21 | --- a/dnf/cli/commands/repoquery.py |
| 22 | +++ b/dnf/cli/commands/repoquery.py |
| 23 | @@ -611,7 +611,7 @@ class RepoQueryCommand(commands.Command): |
| 24 | |
| 25 | def tree_seed(self, query, aquery, opts, level=-1, usedpkgs=None): |
| 26 | for pkg in sorted(set(query.run()), key=lambda p: p.name): |
| 27 | - usedpkgs = set() if usedpkgs is None or level is -1 else usedpkgs |
| 28 | + usedpkgs = set() if usedpkgs is None or level == -1 else usedpkgs |
| 29 | if pkg.name.startswith("rpmlib") or pkg.name.startswith("solvable"): |
| 30 | return |
| 31 | self.grow_tree(level, pkg, opts) |
| 32 | -- |
| 33 | 2.7.4 |
| 34 | |