arch:using axel to pre-download source file | info window handling list attributes better

This commit is contained in:
Vinicius Moreira
2019-09-22 01:01:11 -03:00
parent 0085f40cdf
commit 917c6ec5d7
18 changed files with 189 additions and 22 deletions

View File

@@ -1,5 +1,7 @@
import operator
import time
from functools import reduce
from pathlib import Path
from typing import List, Type, Set
from PyQt5.QtCore import QEvent, Qt, QSize, pyqtSignal
@@ -867,6 +869,18 @@ class ManageWindow(QWidget):
self.thread_install.start()
def _finish_install(self, pkgv: PackageView):
console_output = self.textarea_output.toPlainText()
if console_output:
log_path = '/tmp/bauh/logs/install/{}/{}'.format(pkgv.model.get_type(), pkgv.model.name)
try:
Path(log_path).mkdir(parents=True, exist_ok=True)
with open(log_path + '/{}.log'.format(int(time.time())), 'w+') as f:
f.write(console_output)
except:
self.textarea_output.appendPlainText("[warning] Could not write install log file to '{}'".format(log_path))
self.input_search.setText('')
self.finish_action()