Merge pull request #448 from dylanmtaylor/whitespace
More minor whitespace changes
This commit is contained in:
commit
85fa833a8a
|
|
@ -152,6 +152,7 @@ class BlockDevice():
|
||||||
def flush_cache(self):
|
def flush_cache(self):
|
||||||
self.part_cache = OrderedDict()
|
self.part_cache = OrderedDict()
|
||||||
|
|
||||||
|
|
||||||
class Partition():
|
class Partition():
|
||||||
def __init__(self, path: str, block_device: BlockDevice, part_id=None, size=-1, filesystem=None, mountpoint=None, encrypted=False, autodetect_filesystem=True):
|
def __init__(self, path: str, block_device: BlockDevice, part_id=None, size=-1, filesystem=None, mountpoint=None, encrypted=False, autodetect_filesystem=True):
|
||||||
if not part_id:
|
if not part_id:
|
||||||
|
|
@ -558,6 +559,7 @@ def device_state(name, *args, **kwargs):
|
||||||
return
|
return
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
# lsblk --json -l -n -o path
|
# lsblk --json -l -n -o path
|
||||||
def all_disks(*args, **kwargs):
|
def all_disks(*args, **kwargs):
|
||||||
kwargs.setdefault("partitions", False)
|
kwargs.setdefault("partitions", False)
|
||||||
|
|
@ -569,6 +571,7 @@ def all_disks(*args, **kwargs):
|
||||||
drives[drive['path']] = BlockDevice(drive['path'], drive)
|
drives[drive['path']] = BlockDevice(drive['path'], drive)
|
||||||
return drives
|
return drives
|
||||||
|
|
||||||
|
|
||||||
def convert_to_gigabytes(string):
|
def convert_to_gigabytes(string):
|
||||||
unit = string.strip()[-1]
|
unit = string.strip()[-1]
|
||||||
size = float(string.strip()[:-1])
|
size = float(string.strip()[:-1])
|
||||||
|
|
@ -580,6 +583,7 @@ def convert_to_gigabytes(string):
|
||||||
|
|
||||||
return size
|
return size
|
||||||
|
|
||||||
|
|
||||||
def harddrive(size=None, model=None, fuzzy=False):
|
def harddrive(size=None, model=None, fuzzy=False):
|
||||||
collection = all_disks()
|
collection = all_disks()
|
||||||
for drive in collection:
|
for drive in collection:
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,12 @@ class JSON(json.JSONEncoder, json.JSONDecoder):
|
||||||
def encode(self, obj):
|
def encode(self, obj):
|
||||||
return super(JSON, self).encode(self._encode(obj))
|
return super(JSON, self).encode(self._encode(obj))
|
||||||
|
|
||||||
|
|
||||||
class sys_command:
|
class sys_command:
|
||||||
"""
|
"""
|
||||||
Stolen from archinstall_gui
|
Stolen from archinstall_gui
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, cmd, callback=None, start_callback=None, peak_output=False, environment_vars={}, *args, **kwargs):
|
def __init__(self, cmd, callback=None, start_callback=None, peak_output=False, environment_vars={}, *args, **kwargs):
|
||||||
kwargs.setdefault("worker_id", gen_uid())
|
kwargs.setdefault("worker_id", gen_uid())
|
||||||
kwargs.setdefault("emulate", False)
|
kwargs.setdefault("emulate", False)
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,6 @@ class Installer():
|
||||||
## blkid doesn't trigger on loopback devices really well,
|
## blkid doesn't trigger on loopback devices really well,
|
||||||
## so we'll use the old manual method until we get that sorted out.
|
## so we'll use the old manual method until we get that sorted out.
|
||||||
|
|
||||||
|
|
||||||
if (real_device := self.detect_encryption(root_partition)):
|
if (real_device := self.detect_encryption(root_partition)):
|
||||||
# TODO: We need to detect if the encrypted device is a whole disk encryption,
|
# TODO: We need to detect if the encrypted device is a whole disk encryption,
|
||||||
# or simply a partition encryption. Right now we assume it's a partition (and we always have)
|
# or simply a partition encryption. Right now we assume it's a partition (and we always have)
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,4 @@ If the PR is larger than ~20 lines, please describe it here unless described in
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
|
|
||||||
Any new feature or stability improvement should be tested if possible. Please follow the test instructions at the bottom
|
Any new feature or stability improvement should be tested if possible. Please follow the test instructions at the bottom of the README or use the ISO built on each PR.
|
||||||
of the README or use the ISO built on each PR.
|
|
||||||
|
|
|
||||||
|
|
@ -119,8 +119,9 @@ def ask_user_questions():
|
||||||
try:
|
try:
|
||||||
partition.format(new_filesystem, path='/dev/null', log_formatting=False, allow_formatting=True)
|
partition.format(new_filesystem, path='/dev/null', log_formatting=False, allow_formatting=True)
|
||||||
except archinstall.UnknownFilesystemFormat:
|
except archinstall.UnknownFilesystemFormat:
|
||||||
archinstall.log(f"Selected filesystem is not supported yet. If you want archinstall to support '{new_filesystem}', please create a issue-ticket suggesting it on github at https://github.com/archlinux/archinstall/issues.")
|
archinstall.log(f"Selected filesystem is not supported yet. If you want archinstall to support '{new_filesystem}',")
|
||||||
archinstall.log(f"Until then, please enter another supported filesystem.")
|
archinstall.log("please create a issue-ticket suggesting it on github at https://github.com/archlinux/archinstall/issues.")
|
||||||
|
archinstall.log("Until then, please enter another supported filesystem.")
|
||||||
continue
|
continue
|
||||||
except archinstall.SysCallError:
|
except archinstall.SysCallError:
|
||||||
pass # Expected exception since mkfs.<format> can not format /dev/null. But that means our .format() function supported it.
|
pass # Expected exception since mkfs.<format> can not format /dev/null. But that means our .format() function supported it.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue