From 9cfbf60d0d136299c5171f881e76624afbde7a86 Mon Sep 17 00:00:00 2001 From: Richard Romick Date: Sun, 31 Oct 2021 06:05:26 -0400 Subject: [PATCH] Updated main.py imports --- usr/share/system-installer/UI/main.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/usr/share/system-installer/UI/main.py b/usr/share/system-installer/UI/main.py index 416fbd55..5a7eea40 100755 --- a/usr/share/system-installer/UI/main.py +++ b/usr/share/system-installer/UI/main.py @@ -28,11 +28,17 @@ import json import os import common -from subprocess import Popen, check_output, DEVNULL +import subprocess import gi +import auto_partitioner + gi.require_version('Gtk', '3.0') + from gi.repository import Gtk -import auto_partitioner + + + + def has_special_character(input_string): """Check for special characters""" @@ -545,7 +551,7 @@ def auto_partition(self, button): self.data["AUTO_PART"] = True # Get a list of disks and their capacity - self.devices = json.loads(check_output(["lsblk", "-n", "-i", "--json", + self.devices = json.loads(subprocess.check_output(["lsblk", "-n", "-i", "--json", "-o", "NAME,SIZE,TYPE"]).decode()) self.devices = self.devices["blockdevices"] dev = [] @@ -1382,7 +1388,7 @@ def onnext4clicked(self, button): def opengparted(self, button): """Open GParted""" - Popen("gparted", stdout=DEVNULL, stderr=DEVNULL) + Subprocess.Subprocess.Popen("gparted", stdout=SUBPROCESS.DEVNULL, stderr=SUBPROCESS.DEVNULL) self.data["AUTO_PART"] = False self.input_part("clicked")