Skip to content

Commit

Permalink
fix: fix scan mutil refs
Browse files Browse the repository at this point in the history
Signed-off-by: loonghao <[email protected]>
  • Loading branch information
loonghao committed May 8, 2024
1 parent c2973c8 commit 6928737
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions maya_umbrella/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def scan_files_from_list(self, files):
self.defender = defender
for maya_file in files:
self._fix(maya_file)
while len(self._reference_files) > 0:
for ref in self._reference_files:
self._fix(ref)
return self._fixed_files
Expand Down Expand Up @@ -92,7 +91,9 @@ def _fix(self, maya_file):
maya_funs.open_maya_file(maya_file)
self.defender.collect()
except Exception:
self.logger.debug("failed to open maya file: {maya_file}".format(maya_file=maya_file))
self._failed_files.append(maya_file)

if self.defender.have_issues:
self.defender.fix()
backup_path = get_backup_path(maya_file, root_path=self.output_path)
Expand All @@ -101,6 +102,4 @@ def _fix(self, maya_file):
cmds.file(s=True, f=True)
self._fixed_files.append(maya_file)
self._reference_files.extend(self.defender.collector.infected_reference_files)
if maya_file in self._reference_files:
self._reference_files.remove(maya_file)
cmds.file(new=True, force=True)

0 comments on commit 6928737

Please sign in to comment.