• 
      

    Simplify save_image_to_storage.

    Review Request #7711 — Created Oct. 19, 2015 and submitted

    Information

    Djblets
    release-0.8.x
    f73210e...

    Reviewers

    The save_image_to_storage template tag is one of the most ancient parts of
    Djblets, and it was being way more complicated and fragile than necessary.
    Because storage objects now provide an open method that returns a File
    object, we can just write the image directly to storage rather than doing a
    temporary file dance.

    This also goes through and renames variables to not be called "file".

    Used this with the PDF thumbnailer, which was encountering some raciness in my
    setup.

    Description From Last Updated

    'os' imported but unused

    reviewbotreviewbot

    'tempfile' imported but unused

    reviewbotreviewbot

    'File' imported but unused

    reviewbotreviewbot

    We shouldn't use file here.

    brenniebrennie
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          djblets/util/templatetags/djblets_images.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          djblets/util/templatetags/djblets_images.py
      
      
    2. Show all issues
       'os' imported but unused
      
    3. Show all issues
       'tempfile' imported but unused
      
    4. Show all issues
       'File' imported but unused
      
    5. 
        
    david
    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          djblets/util/templatetags/djblets_images.py
      
      
      
      Tool: Pyflakes
      Processed Files:
          djblets/util/templatetags/djblets_images.py
      
      
    2. 
        
    brennie
    1. 
        
    2. djblets/util/templatetags/djblets_images.py (Diff revision 2)
       
       
       
       
       
      Show all issues

      We shouldn't use file here.

    3. 
        
    david
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          djblets/util/templatetags/djblets_images.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          djblets/util/templatetags/djblets_images.py
      
      
    2. 
        
    brennie
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-0.8.x (b245f63)