third_party/blink/tools/print_stale_test_expectations_entries.py
def check_expectations_line(self, line):
        """Checks the bugs in one test expectations line to see if they're stale.

        Args:
            line: A TestExpectationsLine instance.

        Returns:
            A CSV row (a list of strings), or None if there are no stale bugs.
        """
        bug_links, test_name = line.bugs, line.name
        try:
            if bug_links:
                # Prepopulate bug info.
                for bug_link in bug_links:
                    self.populate_bug_info(bug_link, test_name)
                # Return the stale bug's information.
                if all(self.is_stale(bug_link) for bug_link in bug_links):
                    print line.original_string.strip()
                    return [
                        bug_links[0], self.bug_info[bug_links[0]].filename,
                        self.bug_info[bug_links[0]].days_since_last_update,
                        self.bug_info[bug_links[0]].owner,
                        self.bug_info[bug_links[0]].status
                    ]
        except urllib2.HTTPError as error:
            if error.code == 404:
                message = 'got 404, bug does not exist.'
            elif error.code == 403:
                message = 'got 403, not accessible. Not able to tell if it\'s stale.'
            else:
                message = str(error)
            print >> sys.stderr, 'Error when checking %s: %s' % (
                ','.join(bug_links), message)
        return None
Checks the bugs in one test expectations line to see if they're stale.

        Args:
            line: A TestExpectationsLine instance.

        Returns:
            A CSV row (a list of strings), or None if there are no stale bugs.
        
Checks the bugs in one test expectations line to see if they're stale.
Checks the bugs in one test expectations line to see if they ' re stale .
def check_expectations_line(self, line):
        bug_links, test_name = line.bugs, line.name
        try:
            if bug_links:
                for bug_link in bug_links:
                    self.populate_bug_info(bug_link, test_name)
                if all(self.is_stale(bug_link) for bug_link in bug_links):
                    print line.original_string.strip()
                    return [
                        bug_links[0], self.bug_info[bug_links[0]].filename,
                        self.bug_info[bug_links[0]].days_since_last_update,
                        self.bug_info[bug_links[0]].owner,
                        self.bug_info[bug_links[0]].status
                    ]
        except urllib2.HTTPError as error:
            if error.code == 404:
                message = 'got 404, bug does not exist.'
            elif error.code == 403:
                message = 'got 403, not accessible. Not able to tell if it\'s stale.'
            else:
                message = str(error)
            print >> sys.stderr, 'Error when checking %s: %s' % (
                ','.join(bug_links), message)
        return None
def check_expectations_line ( self , line ) : bug_links , test_name = line . bugs , line . name try : if bug_links : for bug_link in bug_links : self . populate_bug_info ( bug_link , test_name ) if all ( self . is_stale ( bug_link ) for bug_link in bug_links ) : print line . original_string . strip ( ) return [ bug_links [ 0 ] , self . bug_info [ bug_links [ 0 ] ] . filename , self . bug_info [ bug_links [ 0 ] ] . days_since_last_update , self . bug_info [ bug_links [ 0 ] ] . owner , self . bug_info [ bug_links [ 0 ] ] . status ] except urllib2 . HTTPError as error : if error . code == 404 : message = 'got 404, bug does not exist.' elif error . code == 403 : message = 'got 403, not accessible. Not able to tell if it\'s stale.' else : message = str ( error ) print >> sys . stderr , 'Error when checking %s: %s' % ( ',' . join ( bug_links ) , message ) return None
Checks the bugs in one test expectations line to see if they're stale.
Checks the bugs in one test expectations line to see if they ' re stale .
"""Checks the bugs in one test expectations line to see if they're stale.

        Args:
            line: A TestExpectationsLine instance.

        Returns:
            A CSV row (a list of strings), or None if there are no stale bugs.
        """ # Prepopulate bug info. # Return the stale bug's information.
A CSV row (a list of strings), or None if there are no stale bugs.
A CSV row ( a list of strings ) or None if there are no stale bugs .
self
line
A TestExpectationsLine instance.
A TestExpectationsLine instance .