Skip to content

Commit

Permalink
Updated main.py imports
Browse files Browse the repository at this point in the history
  • Loading branch information
SenlisO committed Oct 31, 2021
1 parent 44fdb1f commit 9cfbf60
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions usr/share/system-installer/UI/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down Expand Up @@ -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 = []
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 9cfbf60

Please sign in to comment.