mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 01:36:27 +00:00
Updated to psutil 2.0
This commit is contained in:
@@ -43,7 +43,7 @@ You can find the latest released binary at the following links:
|
||||
- Python 3.3
|
||||
- [PyQt5](http://www.riverbankcomputing.co.uk/software/pyqt/download5)
|
||||
- [Pillow](http://pypi.python.org/pypi/Pillow/) 2.3.0+
|
||||
- [psutil](https://pypi.python.org/pypi/psutil)
|
||||
- [psutil](https://pypi.python.org/pypi/psutil) 2.0+
|
||||
- [python-slugify](http://pypi.python.org/pypi/python-slugify)
|
||||
|
||||
On Debian based distributions these two commands should install all dependencies:
|
||||
|
||||
@@ -32,7 +32,7 @@ if sys.version_info[0] != 3:
|
||||
missing = []
|
||||
try:
|
||||
# noinspection PyUnresolvedReferences
|
||||
from psutil import TOTAL_PHYMEM, Popen
|
||||
from psutil import virtual_memory, Popen
|
||||
except ImportError:
|
||||
missing.append('psutil')
|
||||
try:
|
||||
|
||||
2
kcc.py
2
kcc.py
@@ -37,7 +37,7 @@ except ImportError:
|
||||
missing.append('PyQt5')
|
||||
try:
|
||||
# noinspection PyUnresolvedReferences
|
||||
from psutil import TOTAL_PHYMEM, Popen
|
||||
from psutil import virtual_memory, Popen
|
||||
except ImportError:
|
||||
missing.append('psutil')
|
||||
try:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
Pillow==2.3.0
|
||||
Unidecode==0.04.14
|
||||
psutil==1.2.1
|
||||
python-slugify==0.0.7
|
||||
Reference in New Issue
Block a user