[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][master] extract_component_from_section: return unmodified section again



Title: GitLab

Ansgar pushed to branch master at Debian FTP Team / dak

Commits:

  • 48dd1426
    by Ansgar at 2023-02-05T16:40:01+01:00
    extract_component_from_section: return unmodified section again
    

1 changed file:

Changes:

  • daklib/utils.py
    ... ... @@ -79,14 +79,14 @@ def input_or_exit(prompt: Optional[str] = None) -> str:
    79 79
     
    
    80 80
     
    
    81 81
     def extract_component_from_section(section: str) -> tuple[str, str]:
    
    82
    -    """split "component/section" into "section", "component" parts
    
    82
    +    """split "section" into "section", "component" parts
    
    83 83
     
    
    84 84
         If "component" is not given, "main" is used instead.
    
    85 85
     
    
    86 86
         :return: tuple (section, component)
    
    87 87
         """
    
    88 88
         if section.find('/') != -1:
    
    89
    -        return tuple(reversed(section.split('/', 1)))
    
    89
    +        return section, section.split('/', 1)[0]
    
    90 90
         return section, "main"
    
    91 91
     
    
    92 92
     ################################################################################
    


  • Reply to: