parameters: (self, available_sites)
return_statement: return final_sites
docstring: Get the sites that have less than self.numclassads offline ads
          
          @param available_sites: list of sites to look for
          @return: list of lists - [ ["site", num_delinquent], ... ]
docstring_summary: Get the sites that have less than self.numclassads offline ads
docstring_tokens: Get the sites that have less than self . numclassads offline ads
function: def GetDelinquentSites(self, available_sites):
          """
          Get the sites that have less than self.numclassads offline ads
          
          @param available_sites: list of sites to look for
          @return: list of lists - [ ["site", num_delinquent], ... ]
          """
          def Delinquent(data):
              if data.has_key("Offline"):
                  return data["Offline"]
              return False
          
          fetched = self.condor_status.fetchStored(Delinquent)
          
          sites = {}
          
          # Count the number of unique sites
          for key in fetched.keys():
              if fetched[key][self.siteunique] not in sites:
                  sites[fetched[key][self.siteunique]] = 0
              sites[fetched[key][self.siteunique]] += 1
              
          # Set the number of classads we need
          final_sites = {}  
          for site in sites:
              final_sites[site] = max(self.numclassads - sites[site], 0)
          
          # Fill in the missing sites
          for site in available_sites:
              if site not in final_sites.keys():
                  final_sites[site] = self.numclassads
                  
          return final_sites
function_tokens: def GetDelinquentSites ( self , available_sites ) : def Delinquent ( data ) : if data . has_key ( "Offline" ) : return data [ "Offline" ] return False fetched = self . condor_status . fetchStored ( Delinquent ) sites = { } # Count the number of unique sites for key in fetched . keys ( ) : if fetched [ key ] [ self . siteunique ] not in sites : sites [ fetched [ key ] [ self . siteunique ] ] = 0 sites [ fetched [ key ] [ self . siteunique ] ] += 1 # Set the number of classads we need final_sites = { } for site in sites : final_sites [ site ] = max ( self . numclassads - sites [ site ] , 0 ) # Fill in the missing sites for site in available_sites : if site not in final_sites . keys ( ) : final_sites [ site ] = self . numclassads return final_sites