Skip to content

Commit 642ea15

Browse files
m-blahaj-mracek
authored andcommitted
GObject Introspection import moved to libdnf/hawkey
1 parent 068ec80 commit 642ea15

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

dnf/db/types.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,6 @@
1717
#
1818
# Eduard Cuba <[email protected]>
1919

20-
import gi
21-
gi.require_version('Dnf', '1.0')
22-
from gi.repository import Dnf # noqa
20+
from hawkey import Swdb, SwdbItem, SwdbReason, SwdbPkg, SwdbPkgData,\
21+
SwdbTrans, SwdbGroup, SwdbEnv, convert_reason
2322

24-
25-
Swdb = Dnf.Swdb
26-
SwdbItem = Dnf.SwdbItem
27-
SwdbReason = Dnf.SwdbReason
28-
SwdbPkg = Dnf.SwdbPkg
29-
SwdbPkgData = Dnf.SwdbPkgData
30-
SwdbTrans = Dnf.SwdbTrans
31-
SwdbGroup = Dnf.SwdbGroup
32-
SwdbEnv = Dnf.SwdbEnv
33-
34-
35-
def convert_reason(reason):
36-
if isinstance(reason, Dnf.SwdbReason):
37-
return reason
38-
return Dnf.convert_reason_to_id(reason)

0 commit comments

Comments
 (0)