1
0
mirror of https://github.com/ciromattia/kcc synced 2026-07-21 12:16:12 +00:00

Updated to psutil 2.0

This commit is contained in:
Paweł Jastrzębski
2014-03-13 21:58:15 +01:00
parent e491fca445
commit d77498405b
5 changed files with 5 additions and 9 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ from subprocess import STDOUT, PIPE
from PyQt5 import QtGui, QtCore, QtWidgets
from xml.dom.minidom import parse
from html.parser import HTMLParser
from psutil import TOTAL_PHYMEM, Popen
from psutil import virtual_memory, Popen
from .shared import md5Checksum
from . import comic2ebook
from . import kindlesplit
@@ -338,7 +338,7 @@ class WorkerThread(QtCore.QThread):
self.kindlegenErrorCode = [0]
self.workerOutput = []
# Let's make sure that we don't fill the memory
availableMemory = TOTAL_PHYMEM/1000000000
availableMemory = virtual_memory().total/1000000000
if availableMemory <= 2:
self.threadNumber = 1
elif 2 < availableMemory <= 4: