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

[Git][ftp-team/dak][master] fix(Changes): fix comparison when `Source` is missing



Title: GitLab

Ansgar pushed to branch master at Debian FTP Team / dak

Commits:

  • 971b4236
    by Ansgar at 2024-10-07T11:58:24+02:00
    fix(Changes): fix comparison when `Source` is missing
    
    Previously `__lt__` raised an exception:
    
    ```
    TypeError: '<' not supported between instances of 'NoneType' and 'str'
    ```
    
    Just use an empty string to avoid `None`. This is okay as the key is
    only used for sorting.
    

1 changed file:

Changes:

  • daklib/upload.py
    ... ... @@ -401,7 +401,7 @@ class Changes:
    401 401
             to the filename (this should really never happen).
    
    402 402
             """
    
    403 403
             return (
    
    404
    -            self.changes.get('Source'),
    
    404
    +            self.changes.get('Source', ''),
    
    405 405
                 AptVersion(self.changes.get('Version', '')),
    
    406 406
                 not self.sourceful,
    
    407 407
                 self.filename
    


  • Reply to: