File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ def localPkg(self):
211
211
if self ._from_cmdline :
212
212
return self .location
213
213
loc = self .location
214
- if not self .repo ._local :
214
+ if not self .repo ._repo . isLocal () :
215
215
loc = os .path .basename (loc )
216
216
elif self .baseurl and self .baseurl .startswith ('file://' ):
217
217
return os .path .join (self .baseurl , loc .lstrip ("/" ))[7 :]
@@ -251,7 +251,7 @@ def _is_local_pkg(self):
251
251
if self .repoid == "@System" :
252
252
return True
253
253
return self ._from_cmdline or \
254
- (self .repo ._local and (not self .baseurl or self .baseurl .startswith ('file://' )))
254
+ (self .repo ._repo . isLocal () and (not self .baseurl or self .baseurl .startswith ('file://' )))
255
255
256
256
# yum compatibility method
257
257
def returnIdSum (self ):
Original file line number Diff line number Diff line change @@ -446,14 +446,6 @@ def repofile(self):
446
446
def repofile (self , value ):
447
447
self ._repo .setRepoFilePath (value )
448
448
449
- @property
450
- def _local (self ):
451
- if self .metalink or self .mirrorlist :
452
- return False
453
- if self .baseurl [0 ].startswith ('file://' ):
454
- return True
455
- return False
456
-
457
449
@property
458
450
def _md_expired (self ):
459
451
"""Return whether the cached metadata is expired."""
@@ -462,7 +454,7 @@ def _md_expired(self):
462
454
@property
463
455
def pkgdir (self ):
464
456
# :api
465
- if self ._local :
457
+ if self ._repo . isLocal () :
466
458
return dnf .util .strip_prefix (self .baseurl [0 ], 'file://' )
467
459
if self ._pkgdir is not None :
468
460
return self ._pkgdir
You can’t perform that action at this time.
0 commit comments