labpack/authentication/aws/iam.py
def list_certificates(self):

        '''
            a method to retrieve a list of server certificates

        :return: list with certificate name strings
        '''

        title = '%s.list_certificates' % self.__class__.__name__

    # send request for list of certificates
        self.printer('Querying AWS for server certificates.')
        try:
            response = self.connection.list_server_certificates()
        except:
            raise AWSConnectionError(title)

    # construct certificate list from response
        cert_list = []
        if 'ServerCertificateMetadataList' in response.keys():
            for certificate in response['ServerCertificateMetadataList']:
                cert_list.append(certificate['ServerCertificateName'])

    # report results and return list
        if cert_list:
            print_out = 'Found server certificate'
            if len(cert_list) > 1:
                print_out += 's'
            from labpack.parsing.grammar import join_words
            print_out += ' %s.' % join_words(cert_list)
            self.printer(print_out)
        else:
            self.printer('No server certificates found.')

        self.certificate_list = cert_list
        
        return self.certificate_list

            a method to retrieve a list of server certificates

        :return: list with certificate name strings
        
a method to retrieve a list of server certificates
a method to retrieve a list of server certificates
def list_certificates(self):
        title = '%s.list_certificates' % self.__class__.__name__
        self.printer('Querying AWS for server certificates.')
        try:
            response = self.connection.list_server_certificates()
        except:
            raise AWSConnectionError(title)
        cert_list = []
        if 'ServerCertificateMetadataList' in response.keys():
            for certificate in response['ServerCertificateMetadataList']:
                cert_list.append(certificate['ServerCertificateName'])
        if cert_list:
            print_out = 'Found server certificate'
            if len(cert_list) > 1:
                print_out += 's'
            from labpack.parsing.grammar import join_words
            print_out += ' %s.' % join_words(cert_list)
            self.printer(print_out)
        else:
            self.printer('No server certificates found.')
        self.certificate_list = cert_list
        return self.certificate_list
def list_certificates ( self ) : title = '%s.list_certificates' % self . __class__ . __name__ self . printer ( 'Querying AWS for server certificates.' ) try : response = self . connection . list_server_certificates ( ) except : raise AWSConnectionError ( title ) cert_list = [ ] if 'ServerCertificateMetadataList' in response . keys ( ) : for certificate in response [ 'ServerCertificateMetadataList' ] : cert_list . append ( certificate [ 'ServerCertificateName' ] ) if cert_list : print_out = 'Found server certificate' if len ( cert_list ) > 1 : print_out += 's' from labpack . parsing . grammar import join_words print_out += ' %s.' % join_words ( cert_list ) self . printer ( print_out ) else : self . printer ( 'No server certificates found.' ) self . certificate_list = cert_list return self . certificate_list
a method to retrieve a list of server certificates
a method to retrieve a list of server certificates
'''
            a method to retrieve a list of server certificates

        :return: list with certificate name strings
        ''' # send request for list of certificates # construct certificate list from response # report results and return list
list with certificate name strings
list with certificate name strings
self