#491 Fix paths and mode detection in deps.py listpaths
Merged 9 months ago by ngompa. Opened 9 months ago by eclipseo.
eclipseo/FedoraReview fix_listpaths  into  master

file modified
+5 -1
@@ -17,6 +17,7 @@ 

  

  """ Interface to package dependencies. """

  

+ import re

  import shlex

  import subprocess

  
@@ -326,7 +327,10 @@ 

          except StopIteration:

              return dirs, files

          try:

-             path, mode = line.rsplit(None, 10)[0:5:4]

+             first_number_match = re.search(r'\b\d+\b\s+\b\d+\b', line)

+             first_number_start = first_number_match.start()

+             path = line[:first_number_start].strip()

+             mode = line[first_number_start:].rsplit(None, 10)[3:4]

          except ValueError:

              # E. g., when given '(contains no files)'

              continue

Pull-Request has been merged by ngompa

9 months ago
Metadata