Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
2cd2f903
Verified
Commit
2cd2f903
authored
Nov 25, 2019
by
Jan Alexander Steffens (heftig)
Browse files
lsrepo: Fix warnings in Python 3.8
parent
4428ffc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
roles/dbscripts/files/lsrepo
View file @
2cd2f903
...
...
@@ -42,7 +42,7 @@ class DBParser:
log
.
debug
(
"Parsing line %r, state %r"
,
line
,
state
)
if
state
is
"parsing"
:
if
state
==
"parsing"
:
if
line
==
"%NAME%"
:
self
.
_state
=
"name"
self
.
_add_package
()
...
...
@@ -50,13 +50,13 @@ class DBParser:
self
.
_state
=
"base"
elif
line
==
"%VERSION%"
:
self
.
_state
=
"version"
elif
state
is
"name"
:
elif
state
==
"name"
:
self
.
_name
=
line
self
.
_state
=
"parsing"
elif
state
is
"base"
:
elif
state
==
"base"
:
self
.
_base
=
line
self
.
_state
=
"parsing"
elif
state
is
"version"
:
elif
state
==
"version"
:
self
.
_version
=
line
self
.
_state
=
"parsing"
else
:
...
...
@@ -76,7 +76,7 @@ class DBParser:
def
__exit__
(
self
,
exc_type
,
exc
,
exc_tb
):
if
exc
is
not
None
:
return
if
self
.
_state
is
not
"done"
:
if
self
.
_state
!=
"done"
:
warn
(
"parsing result discarded"
)
self
.
_state
=
"finalized"
self
.
_add_package
()
...
...
@@ -178,10 +178,10 @@ finally:
loop
.
close
()
if
args
.
mode
is
"bases"
:
if
args
.
mode
==
"bases"
:
for
base
in
set
(
bases
(
repos
)):
print
(
base
)
elif
args
.
mode
is
"names"
:
elif
args
.
mode
==
"names"
:
for
name
in
{
n
for
p
in
packages
(
repos
)
for
n
in
p
[
"names"
]}:
print
(
name
)
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment