parameters: (self)
docstring: Connect to libvirt subsystem.
          @raise CuckooMachineError: when unable to connect to libvirt.
docstring_summary: Connect to libvirt subsystem.
docstring_tokens: Connect to libvirt subsystem .
function: def _connect(self):
          """Connect to libvirt subsystem.
          @raise CuckooMachineError: when unable to connect to libvirt.
          """
          # Check if a connection string is available.
          if not self.dsn:
              raise CuckooMachineError("You must provide a proper "
                                       "connection string")
  
          try:
              return libvirt.open(self.dsn)
          except libvirt.libvirtError:
              raise CuckooMachineError("Cannot connect to libvirt")
function_tokens: def _connect ( self ) : # Check if a connection string is available. if not self . dsn : raise CuckooMachineError ( "You must provide a proper " "connection string" ) try : return libvirt . open ( self . dsn ) except libvirt . libvirtError : raise CuckooMachineError ( "Cannot connect to libvirt" )