Bug #14722

Tails Installer's is_ISO_selected method is not a predicate

Added by anonym 2017-09-25 17:01:36 . Updated 2017-11-15 11:34:01 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Installation
Target version:
Start date:
2017-09-25
Due date:
% Done:

100%

Feature Branch:
tails:bugfix/14755-installer-consistent-drive-plugging-state
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Installer
Deliverable for:

Description

From Feature #8860#note-40:

The is_ISO_selected name suggests it’s a simple predicate but this method 1. checks if we need an ISO in the first place (which the name doesn’t convey); 2. has side effects (while a predicate must not). I think some refactoring is in order. From a caller’s PoV I would do:

if self.need_ISO() and not self.is_ISO_selected():
    self.warn_ISO_not_selected()

… i.e. two predicates and a third method that does the side-effect.


Subtasks


History

#1 Updated by intrigeri 2017-09-26 05:44:01

  • Tracker changed from Feature to Bug
  • Subject changed from Tails Installer's is_ISO_elected method is not a predicate to Tails Installer's is_ISO_selected method is not a predicate

#2 Updated by kurono 2017-09-29 15:46:41

  • QA Check set to Ready for QA
  • Feature Branch set to feature/9005-Improve-tails-installer

#3 Updated by intrigeri 2017-11-06 15:27:51

  • Assignee changed from anonym to intrigeri

#4 Updated by intrigeri 2017-11-08 20:49:04

  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 50
  • QA Check changed from Ready for QA to Pass

Looks good to me. I’ll see once I’ve reviewed the rest of this branch what’s the next step.

#5 Updated by intrigeri 2017-11-10 12:01:39

  • Assignee changed from intrigeri to anonym

See Feature #14720#note-10.

#6 Updated by anonym 2017-11-10 17:42:57

  • Assignee changed from anonym to intrigeri
  • QA Check changed from Pass to Ready for QA
  • Feature Branch changed from feature/9005-Improve-tails-installer to tails:bugfix/14755-installer-consistent-drive-plugging-state

See Bug #14755?#note-17.

#7 Updated by intrigeri 2017-11-11 10:47:51

  • Status changed from In Progress to Fix committed
  • % Done changed from 50 to 100

Applied in changeset commit:ddc95fba2cd76f10ee38a09682700ab059ba291a.

#8 Updated by intrigeri 2017-11-11 10:48:21

  • Assignee deleted (intrigeri)
  • QA Check changed from Ready for QA to Pass

#9 Updated by anonym 2017-11-15 11:34:01

  • Status changed from Fix committed to Resolved