Exemplo n.º 1
0
 def mount(self,
           fstype=None,
           options=None,
           auth_no_user_interaction=None):
     """Mount filesystem."""
     options = list(filter(None, (options or '').split(','))) + filter_opt({
         'auth_no_user_interaction': auth_no_user_interaction
     })
     return self.method.FilesystemMount(fstype or self.id_type, options)
Exemplo n.º 2
0
    def get_all_handleable(self):
        """
        Enumerate all handleable devices currently known to udisks.

        :returns: handleable devices
        :rtype: iterable

        NOTE: returns only devices that are still valid. This protects from
        race conditions inside udiskie.
        """
        return filter(self.is_handleable, self.udisks)
Exemplo n.º 3
0
    def get_all_handleable(self):
        """
        Enumerate all handleable devices currently known to udisks.

        :returns: handleable devices
        :rtype: iterable

        NOTE: returns only devices that are still valid. This protects from
        race conditions inside udiskie.
        """
        return filter(self.is_handleable, self.udisks)
Exemplo n.º 4
0
 def __iter__(self):
     """Iterate over all devices."""
     return filter(None, (self[path] for path in self.paths()
                          if object_kind(path) in ('device', 'drive')))
Exemplo n.º 5
0
 def __iter__(self):
     """Iterate over all devices."""
     return filter(None, map(self.get, self.paths()))
Exemplo n.º 6
0
 def __iter__(self):
     """Iterate over all devices."""
     return filter(None, map(self.get, self.paths()))
Exemplo n.º 7
0
 def __iter__(self):
     """Iterate over all devices."""
     return filter(None, (self[path] for path in self.paths()
                          if object_kind(path) in ('device', 'drive')))