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

[Git][ftp-team/dak][master] daklib/command.py: correctly open newly created file in exclusive mode



Title: GitLab

Ansgar pushed to branch master at Debian FTP Team / dak

Commits:

  • da2e365e
    by Ansgar at 2023-11-12T12:52:04+01:00
    daklib/command.py: correctly open newly created file in exclusive mode
    
    Fixes error introduced in 2e1625cfbc931bb4ce8c0930050cb0a411a7aa99
    

1 changed file:

Changes:

  • daklib/command.py
    ... ... @@ -354,7 +354,7 @@ class CommandFile:
    354 354
             filename = f"{command}.{source}_{upload.changes.version}"
    
    355 355
             content = "OK" if command == "ACCEPT" else "NOTOK"
    
    356 356
     
    
    357
    -        with open(os.path.join(upload.policy_queue.path, "COMMENTS", filename), "wx") as f:
    
    357
    +        with open(os.path.join(upload.policy_queue.path, "COMMENTS", filename), "x") as f:
    
    358 358
                 f.write(content + "\n")
    
    359 359
     
    
    360 360
         def _action_process_upload_common(self, fingerprint, section, session) -> None:
    


  • Reply to: