#NEWLINE# def _init_address_fields( self , pci_addr ) : #NEWLINE# #INDENT# if self . is_physical_function : #NEWLINE# #INDENT# ( self . domain , self . bus , self . slot , self . func ) = utils . get_pci_address_fields ( pci_addr ) #NEWLINE# return #NEWLINE# #UNINDENT# ( dbs , sep , func ) = pci_addr . partition ( '.' ) #NEWLINE# if func : #NEWLINE# #INDENT# fstr = func . strip ( ) #NEWLINE# if ( fstr != ANY ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# f = get_value ( fstr ) #NEWLINE# #UNINDENT# except SyntaxError : #NEWLINE# #INDENT# raise exception . PciDeviceWrongAddressFormat ( address = pci_addr ) #NEWLINE# #UNINDENT# if ( f > MAX_FUNC ) : #NEWLINE# #INDENT# raise exception . PciDeviceInvalidAddressField ( address = pci_addr , field = 'function' ) #NEWLINE# #UNINDENT# self . func = ( '%1x' % f ) #NEWLINE# #UNINDENT# #UNINDENT# if dbs : #NEWLINE# #INDENT# dbs_fields = dbs . split ( ':' ) #NEWLINE# if ( len ( dbs_fields ) > 3 ) : #NEWLINE# #INDENT# raise exception . PciDeviceWrongAddressFormat ( address = pci_addr ) #NEWLINE# #UNINDENT# dbs_all = [ ANY for x in range ( ( 3 - len ( dbs_fields ) ) ) ] #NEWLINE# dbs_all . extend ( dbs_fields ) #NEWLINE# dbs_checked = [ ( s . strip ( ) or ANY ) for s in dbs_all ] #NEWLINE# ( self . domain , self . bus , self . slot ) = dbs_checked #NEWLINE# get_pci_dev_info ( self , 'domain' , MAX_DOMAIN , '%04x' ) #NEWLINE# get_pci_dev_info ( self , 'bus' , MAX_BUS , '%02x' ) #NEWLINE# get_pci_dev_info ( self , 'slot' , MAX_SLOT , '%02x' ) #NEWLINE# self . _check_physical_function ( )