• 
      

    Fix further issues with missing file attachments.

    Review Request #6444 — Created Oct. 15, 2014 and submitted

    Information

    Review Board
    release-2.0.x
    a5da2fb...

    Reviewers

    The previous fix for missing file attachments broke once the f.close()
    call was moved into the finally: block if the file attachment was
    missing, due to the fact that the initial statement failed and f was
    not a valid variable. This change fixes this by creating two separate
    try/except blocks.

    It also sandboxes the generation of text-based file attachment comment
    thumbnails, which would also break the page if the file was missing.

    Tested on a review request where both issues were hit. I was able to
    get the page to load.

    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/reviews/ui/text.py
          reviewboard/attachments/mimetypes.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/reviews/ui/text.py
          reviewboard/attachments/mimetypes.py
      
      
    2. 
        
    david
    1. In your change description, you have "the generation of text-based file attachment comment thumbnail generation"

    2. 
        
    chipx86
    david
    1. Ship It!

    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (e59e0ad)