mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Rename method _paths_match_target -> target_matches_path_pattern
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
This commit is contained in:
parent
2418df49e9
commit
69d2da927e
1 changed files with 5 additions and 5 deletions
|
|
@ -285,7 +285,7 @@ def get_one_valid_targetinfo(self, target_filename):
|
|||
logger.debug('Interrogating mappings..' + repr(mapping))
|
||||
|
||||
# If this mapping is relevant to the target...
|
||||
if self._paths_match_target(mapping['paths'], target_filename):
|
||||
if self._target_matches_path_pattern(target_filename, mapping['paths']):
|
||||
targetinfo_and_updaters = []
|
||||
targetinfos = []
|
||||
|
||||
|
|
@ -381,12 +381,12 @@ def get_one_valid_targetinfo(self, target_filename):
|
|||
|
||||
|
||||
|
||||
def _paths_match_target(self, paths, target_filename):
|
||||
for path in paths:
|
||||
logger.debug('Interrogating path ' + repr(path) + 'for'
|
||||
def _target_matches_path_pattern(self, target_filename, path_patterns):
|
||||
for path_pattern in path_patterns:
|
||||
logger.debug('Interrogating pattern ' + repr(path_pattern) + 'for'
|
||||
' target: ' + repr(target_filename))
|
||||
|
||||
if fnmatch.fnmatch(target_filename, path):
|
||||
if fnmatch.fnmatch(target_filename, path_pattern):
|
||||
logger.debug('Found a match for ' + repr(target_filename))
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue