Replace one bit of horrible spaghetti code with some spaghetti code that's less horrible but still horrible.

HEAD
Simon Quigley 6 years ago
parent 93c494e058
commit ab293880a2

1
debian/control vendored

@ -20,6 +20,7 @@ Vcs-Browser: https://github.com/lubuntu-team/lubuntu-about
Package: lubuntu-about
Architecture: all
Depends: lsb-release,
neofetch,
pyqt5-dev,
python3-cpuinfo,
python3-lubuntu-about,

@ -79,8 +79,14 @@ def setvariables():
cpu = cpuinfo.get_cpu_info()["brand"]
# FIXME: Please, someone simplify this...
graphics = (run(["lspci", "-mm"], stdout=PIPE).stdout.decode('utf-8').split("\n")[2].replace("\"", "").split("VGA compatible controller ")[1].split("Controller")[0])+"Controller"
# FIXME: This code is horrible, it shouldn't depend on neofetch and should be reworked.
graphicslist = run(["neofetch", "--stdout"], stdout=PIPE).stdout.decode("utf-8").split("\n")
i = 0
while i < len(graphicslist):
if "GPU" in graphicslist[i]:
graphics = graphicslist[i].replace("GPU: ", "")
i += 1
freemem = memcalc(virtual_memory().free)
totalmem = memcalc(virtual_memory().total)

Loading…
Cancel
Save