[Pkg-privacy-commits] [tails-installer] 35/43: Don't try to call underlying_physical_device unless running from Tails.

Ulrike Uhlig u-guest at moszumanska.debian.org
Tue Nov 15 23:30:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch debian/sid
in repository tails-installer.

commit 1dc06382a50f25ff2993a1644d0936eb77f028f4
Author: intrigeri <intrigeri at boum.org>
Date:   Fri Jul 22 10:04:21 2016 +0000

    Don't try to call underlying_physical_device unless running from Tails.
    
    Previously, we would try that as long as /lib/live/mount/medium existed,
    even if not running from Tails, and then the application would exit:
    
    Traceback (most recent call last):
      File "/usr/lib/tails_installer/tails-installer", line 105, in <module>
        main()
      File "/usr/lib/tails_installer/tails-installer", line 99, in main
        win = TailsInstallerWindow(opts=opts, args=sys.argv)
      File "/usr/lib/python2.7/dist-packages/tails_installer/gui.py", line 328, in __init__
        self.populate_devices()
      File "/usr/lib/python2.7/dist-packages/tails_installer/gui.py", line 519, in populate_devices
        self.live.detect_supported_drives(callback=add_devices)
      File "/usr/lib/python2.7/dist-packages/tails_installer/creator.py", line 701, in detect_supported_drives
        callback()
      File "/usr/lib/python2.7/dist-packages/tails_installer/gui.py", line 464, in add_devices
        if self.live.running_device() in [info['udi'], info['parent_udi']]:
      File "/usr/lib/python2.7/dist-packages/tails_installer/creator.py", line 555, in running_device
        return underlying_physical_device(liveos_mountpoint)
      File "/usr/lib/python2.7/dist-packages/tails_installer/utils.py", line 97, in underlying_physical_device
        parentblock = udisksclient.get_block_for_drive(drive, get_physical=False)
    TypeError: Argument 1 does not allow None as a value
---
 tails_installer/creator.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tails_installer/creator.py b/tails_installer/creator.py
index 587fab3..286fec4 100755
--- a/tails_installer/creator.py
+++ b/tails_installer/creator.py
@@ -554,7 +554,7 @@ class TailsInstallerCreator(object):
         /org/freedesktop/UDisks2/devices/sdb) from which the system
         is running."""
         liveos_mountpoint = self.running_liveos_mountpoint()
-        if os.path.exists(liveos_mountpoint):
+        if is_running_from_tails() and os.path.exists(liveos_mountpoint):
             return underlying_physical_device(liveos_mountpoint)
         else:
             return False

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git



More information about the Pkg-privacy-commits mailing list