#NEWLINE# def _Open( self , path_spec , mode = 'rb' ) : #NEWLINE# #INDENT# "Opens the file system object defined by path specification.\n\n    Args:\n      path_spec: a path specification (instance of PathSpec).\n      mode: optional file access mode. The default is 'rb' read-only binary.\n\n    Raises:\n      AccessError: if the access to open the file was denied.\n      IOError: if the file system object could not be opened.\n      PathSpecError: if the path specification is incorrect.\n      ValueError: if the path specification is invalid.\n    " #NEWLINE# if ( not path_spec . HasParent ( ) ) : #NEWLINE# #INDENT# raise errors . PathSpecError ( 'Unsupported path specification without parent.' ) #NEWLINE# #UNINDENT# file_object = resolver . Resolver . OpenFileObject ( path_spec . parent , resolver_context = self . _resolver_context ) #NEWLINE# try : #NEWLINE# #INDENT# vslvm_handle = pyvslvm . handle ( ) #NEWLINE# vslvm_handle . open_file_object ( file_object ) #NEWLINE# vslvm_handle . open_physical_volume_files_as_file_objects ( [ file_object ] ) #NEWLINE# vslvm_volume_group = vslvm_handle . get_volume_group ( ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# file_object . close ( ) #NEWLINE# raise #NEWLINE# #UNINDENT# self . _file_object = file_object #NEWLINE# self . _vslvm_handle = vslvm_handle #NEWLINE# self . _vslvm_volume_group = vslvm_volume_group