@@ -136,20 +136,20 @@ def reason(self, pkg):
136
136
return self .swdb .reason (str (pkg ))
137
137
138
138
def ipkg_to_rpmdata (self , ipkg ):
139
+ """ Extract RPMDB data from Dnf.Package """
139
140
pid = self .pkg2pid (ipkg , create = False )
140
141
rpmdata = SwdbRpmData .new (
141
142
pid ,
142
- getattr (ipkg , "buildtime" , 0 ),
143
- getattr (ipkg , "buildhost" , '' ),
144
- getattr (ipkg , "license" , '' ),
145
- getattr (ipkg , "packager" , '' ),
146
- getattr (ipkg , "size" , '' ),
147
- getattr (ipkg , "sourcerpm" , '' ),
148
- getattr (ipkg , "url" , '' ),
149
- getattr (ipkg , "vendor" , '' ),
150
- getattr (ipkg , "committer" , '' ),
151
- getattr (ipkg , "committime" , 0 )
152
- )
143
+ int ((getattr (ipkg , "buildtime" , None ) or 0 )),
144
+ str ((getattr (ipkg , "buildhost" , None ) or '' )),
145
+ str ((getattr (ipkg , "license" , None ) or '' )),
146
+ str ((getattr (ipkg , "packager" , None ) or '' )),
147
+ str ((getattr (ipkg , "size" , None ) or '' )),
148
+ str ((getattr (ipkg , "sourcerpm" , None ) or '' )),
149
+ str ((getattr (ipkg , "url" , None ) or '' )),
150
+ str ((getattr (ipkg , "vendor" , None ) or '' )),
151
+ str ((getattr (ipkg , "committer" , None ) or '' )),
152
+ int ((getattr (ipkg , "committime" , None ) or 0 )))
153
153
return rpmdata
154
154
155
155
def ipkg_to_pkg (self , ipkg ):
0 commit comments