__all__ = ['AutoMounter']

class AutoMounter(object):
    """
    Automatically mount newly added media.
    """
    def __init__(self, mounter):
        self.mounter = mounter

    def device_added(self, udevice):
        self.mounter.add_device(udevice)

    def media_added(self, udevice):
        self.mounter.add_device(udevice)

    # Automount LUKS cleartext holders after they have been unlocked.
    # Why doesn't this work in device_added?
    def device_unlocked(self, udevice):
        self.mounter.add_device(udevice.luks_cleartext_holder)


__all__ = ['AutoMounter']

class AutoMounter(object):
    """
    Automatically mount newly added media.
    """
    def __init__(self, mounter):
        self.mounter = mounter

    def device_added(self, udevice):
        self.mounter.add_device(udevice)

    def media_added(self, udevice):
        self.mounter.add_device(udevice)


Revert "Automount LUKS devices when they have been unlocked"
Revert "Automount LUKS devices when they have been unlocked"

This reverts commit d67f8c7284e8d3bff2e7c81711a9fece952aea46.

  __all__ = ['AutoMounter']
  
  class AutoMounter(object):
      """
      Automatically mount newly added media.
      """
      def __init__(self, mounter):
          self.mounter = mounter
  
      def device_added(self, udevice):
          self.mounter.add_device(udevice)
  
      def media_added(self, udevice):
          self.mounter.add_device(udevice)
  
-     # Automount LUKS cleartext holders after they have been unlocked.
-     # Why doesn't this work in device_added?
-     def device_unlocked(self, udevice):
-         self.mounter.add_device(udevice.luks_cleartext_holder)
  
- 
Revert "Automount LUKS devices when they have been unlocked"
## Code Before:
__all__ = ['AutoMounter']

class AutoMounter(object):
    """
    Automatically mount newly added media.
    """
    def __init__(self, mounter):
        self.mounter = mounter

    def device_added(self, udevice):
        self.mounter.add_device(udevice)

    def media_added(self, udevice):
        self.mounter.add_device(udevice)

    # Automount LUKS cleartext holders after they have been unlocked.
    # Why doesn't this work in device_added?
    def device_unlocked(self, udevice):
        self.mounter.add_device(udevice.luks_cleartext_holder)


## Instruction:
Revert "Automount LUKS devices when they have been unlocked"
## Code After:
__all__ = ['AutoMounter']

class AutoMounter(object):
    """
    Automatically mount newly added media.
    """
    def __init__(self, mounter):
        self.mounter = mounter

    def device_added(self, udevice):
        self.mounter.add_device(udevice)

    def media_added(self, udevice):
        self.mounter.add_device(udevice)

