• 
      

    Change the return type of get_hosting_services.

    Review Request #5883 — Created May 26, 2014 and submitted

    Information

    Review Board
    master
    8a7c83e...

    Reviewers

    get_hosting_services was a generator returning tuples of (id, cls) for
    each HostingService. This was to work around not having a way to access
    the ID from a HostingService class.

    This change fixes this by assigning the ID at registration time to the
    class, allowing any consumer of the class to get the ID. This simplifies
    get_hosting_services(), and is also needed for the new HostingService
    API resource.

    Unit tests pass.

    Used the ID in another change successfully.

    reviewbot
    1. This is a review from Review Bot.
        Tool: PEP8 Style Checker
        Processed Files:
          reviewboard/scmtools/forms.py
          reviewboard/hostingsvcs/service.py
        Ignored Files:
      
      
    2. 
        
    reviewbot
    1. This is a review from Review Bot.
        Tool: Pyflakes
        Processed Files:
          reviewboard/scmtools/forms.py
          reviewboard/hostingsvcs/service.py
        Ignored Files:
      
      
    2. 
        
    david
    1. Ship It!

    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (3d00b37)