|author||anonym <email@example.com>||2017-09-20 15:40:54 +0200|
|committer||anonym <firstname.lastname@example.org>||2017-09-20 18:12:02 +0200|
Properly identify too small devices.
I cannot pretend to understand why the previous condition was supposed to work. Any way, it didn't work for isohybrid's, but this new condition does, while being more self-explaining.
1 files changed, 5 insertions, 3 deletions
diff --git a/tails_installer/creator.py b/tails_installer/creator.py
index 8b7c68e..6b23249 100755
@@ -663,9 +663,11 @@ class LinuxTailsInstallerCreator(TailsInstallerCreator):
parent_block = None
- # Check for devices that are too small
- if parent_block is None \
- and not self.is_device_big_enough_for_installation(data['size']):
+ # Check for devices that are too small. Note that we still
+ # allow devices that can be upgraded for supporting legacy
+ # installations.
+ if not self.is_device_big_enough_for_installation(data['size']) and \
+ not self.device_can_be_upgraded(data):
self.log.warning('Skipping too small device: %s' % data['device'])
data['is_device_big_enough_for_installation'] = False