• 
      

    Fix error message when Python isn't properly configured to proxy server.

    Review Request #7689 — Created Oct. 10, 2015 and discarded

    Information

    Review Board
    master

    Reviewers

    Better handled 'URLError' error message by placing line 'data = e.read()' in try block instead of outside of it. This way, when there is a URLError exception, it will not raise an error with URLError calling read().

    Tested by reloading browser (Chrome).

    Ran ./reviewboard/manage.py test -- reviewboard.hostingsvcs.tests and all 167 tests passed.

    Description From Last Updated

    Should probably put this newline back

    mike_conleymike_conley

    'KilnClient' imported but unused

    reviewbotreviewbot

    Thanks for the test! This is fantastic. Is it possible to write a similar test for the GitHub hosting service?

    mike_conleymike_conley

    Please remove this line (so there's no blank line at the top of the function).

    daviddavid

    Please remove this line.

    daviddavid

    Here too.

    daviddavid

    Can you sort these in alphabetical order?

    daviddavid

    Should be "GitHub".

    daviddavid

    This isn't testing anything. You're never actually calling any of the functions. It's not even taking all the required arguments. …

    chipx86chipx86

    Same here.

    chipx86chipx86

    Col: 80 E501 line too long (97 > 79 characters)

    reviewbotreviewbot

    Col: 80 E501 line too long (101 > 79 characters)

    reviewbotreviewbot

    Col: 80 E501 line too long (110 > 79 characters)

    reviewbotreviewbot

    Col: 80 E501 line too long (114 > 79 characters)

    reviewbotreviewbot

    Col: 80 E501 line too long (84 > 79 characters)

    reviewbotreviewbot

    Col: 9 E265 block comment should start with '# '

    reviewbotreviewbot

    Col: 80 E501 line too long (80 > 79 characters)

    reviewbotreviewbot

    Col: 13 E116 unexpected indentation (comment)

    reviewbotreviewbot

    Col: 13 E265 block comment should start with '# '

    reviewbotreviewbot

    Col: 80 E501 line too long (97 > 79 characters)

    reviewbotreviewbot

    Col: 80 E501 line too long (101 > 79 characters)

    reviewbotreviewbot

    Col: 80 E501 line too long (110 > 79 characters)

    reviewbotreviewbot

    Col: 80 E501 line too long (114 > 79 characters)

    reviewbotreviewbot

    Col: 80 E501 line too long (84 > 79 characters)

    reviewbotreviewbot

    Col: 80 E501 line too long (88 > 79 characters)

    reviewbotreviewbot

    Col: 9 E265 block comment should start with '# '

    reviewbotreviewbot

    Col: 80 E501 line too long (80 > 79 characters)

    reviewbotreviewbot

    Col: 13 E116 unexpected indentation (comment)

    reviewbotreviewbot

    Col: 13 E265 block comment should start with '# '

    reviewbotreviewbot
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/hostingsvcs/github.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/hostingsvcs/github.py
      
      
    2. 
        
    mike_conley
    1. I think there are still .read() usages in kiln.py as well - can we fix those too?

    2. reviewboard/hostingsvcs/github.py (Diff revision 1)
       
       
      Show all issues

      Should probably put this newline back

    3. 
        
    CA
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      
    2. reviewboard/hostingsvcs/tests.py (Diff revision 2)
       
       
      Show all issues
       'KilnClient' imported but unused
      
    3. 
        
    mike_conley
    1. 
        
    2. reviewboard/hostingsvcs/tests.py (Diff revision 2)
       
       
      Show all issues

      Thanks for the test! This is fantastic. Is it possible to write a similar test for the GitHub hosting service?

    3. 
        
    CA
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      
    2. 
        
    david
    1. Just a handful of trivial requests.

    2. reviewboard/hostingsvcs/github.py (Diff revision 3)
       
       
      Show all issues

      Please remove this line (so there's no blank line at the top of the function).

    3. reviewboard/hostingsvcs/github.py (Diff revision 3)
       
       
      Show all issues

      Please remove this line.

    4. reviewboard/hostingsvcs/kiln.py (Diff revision 3)
       
       
      Show all issues

      Here too.

    5. reviewboard/hostingsvcs/tests.py (Diff revision 3)
       
       
       
       
      Show all issues

      Can you sort these in alphabetical order?

    6. reviewboard/hostingsvcs/tests.py (Diff revision 3)
       
       
      Show all issues

      Should be "GitHub".

    7. 
        
    CA
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      
    2. 
        
    brennie
    1. The change description should be a more high level overview of the change instead of indicating what lines were moved where. Have a look at https://www.reviewboard.org/docs/codebase/dev/writing-good-descriptions/

      Other than that, this change looks fine to me :)

    2. 
        
    chipx86
    1. 
        
    2. reviewboard/hostingsvcs/tests.py (Diff revision 4)
       
       
      Show all issues

      This isn't testing anything. You're never actually calling any of the functions. It's not even taking all the required arguments. That leads me to believe this wasn't actually tested.

      Make sure you trigger something that will raise the URLError. I want to see a working assertRaises, and an assertion that service.client.http_get was called.

    3. reviewboard/hostingsvcs/tests.py (Diff revision 4)
       
       
      Show all issues

      Same here.

    4. 
        
    CA
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      
    2. 
        
    CA
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      
    2. reviewboard/hostingsvcs/github.py (Diff revision 6)
       
       
      Show all issues
      Col: 80
       E501 line too long (97 > 79 characters)
      
    3. reviewboard/hostingsvcs/github.py (Diff revision 6)
       
       
      Show all issues
      Col: 80
       E501 line too long (101 > 79 characters)
      
    4. reviewboard/hostingsvcs/tests.py (Diff revision 6)
       
       
      Show all issues
      Col: 80
       E501 line too long (110 > 79 characters)
      
    5. reviewboard/hostingsvcs/tests.py (Diff revision 6)
       
       
      Show all issues
      Col: 80
       E501 line too long (114 > 79 characters)
      
    6. reviewboard/hostingsvcs/tests.py (Diff revision 6)
       
       
      Show all issues
      Col: 80
       E501 line too long (84 > 79 characters)
      
    7. reviewboard/hostingsvcs/tests.py (Diff revision 6)
       
       
      Show all issues
      Col: 9
       E265 block comment should start with '# '
      
    8. reviewboard/hostingsvcs/tests.py (Diff revision 6)
       
       
      Show all issues
      Col: 80
       E501 line too long (80 > 79 characters)
      
    9. reviewboard/hostingsvcs/tests.py (Diff revision 6)
       
       
      Show all issues
      Col: 13
       E116 unexpected indentation (comment)
      
    10. reviewboard/hostingsvcs/tests.py (Diff revision 6)
       
       
      Show all issues
      Col: 13
       E265 block comment should start with '# '
      
    11. 
        
    CA
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      Ignored Files:
          docs/bugfix_wrapup.txt
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/hostingsvcs/github.py
          reviewboard/hostingsvcs/kiln.py
          reviewboard/hostingsvcs/tests.py
      
      Ignored Files:
          docs/bugfix_wrapup.txt
      
      
    2. reviewboard/hostingsvcs/github.py (Diff revision 7)
       
       
      Show all issues
      Col: 80
       E501 line too long (97 > 79 characters)
      
    3. reviewboard/hostingsvcs/github.py (Diff revision 7)
       
       
      Show all issues
      Col: 80
       E501 line too long (101 > 79 characters)
      
    4. reviewboard/hostingsvcs/tests.py (Diff revision 7)
       
       
      Show all issues
      Col: 80
       E501 line too long (110 > 79 characters)
      
    5. reviewboard/hostingsvcs/tests.py (Diff revision 7)
       
       
      Show all issues
      Col: 80
       E501 line too long (114 > 79 characters)
      
    6. reviewboard/hostingsvcs/tests.py (Diff revision 7)
       
       
      Show all issues
      Col: 80
       E501 line too long (84 > 79 characters)
      
    7. reviewboard/hostingsvcs/tests.py (Diff revision 7)
       
       
      Show all issues
      Col: 80
       E501 line too long (88 > 79 characters)
      
    8. reviewboard/hostingsvcs/tests.py (Diff revision 7)
       
       
      Show all issues
      Col: 9
       E265 block comment should start with '# '
      
    9. reviewboard/hostingsvcs/tests.py (Diff revision 7)
       
       
      Show all issues
      Col: 80
       E501 line too long (80 > 79 characters)
      
    10. reviewboard/hostingsvcs/tests.py (Diff revision 7)
       
       
      Show all issues
      Col: 13
       E116 unexpected indentation (comment)
      
    11. reviewboard/hostingsvcs/tests.py (Diff revision 7)
       
       
      Show all issues
      Col: 13
       E265 block comment should start with '# '
      
    12. 
        
    david
    Review request changed
    Status:
    Discarded