1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-15 02:36:44 +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

View File

@@ -43,7 +43,7 @@ You can find the latest released binary at the following links:
- Python 3.3 - Python 3.3
- [PyQt5](http://www.riverbankcomputing.co.uk/software/pyqt/download5) - [PyQt5](http://www.riverbankcomputing.co.uk/software/pyqt/download5)
- [Pillow](http://pypi.python.org/pypi/Pillow/) 2.3.0+ - [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) - [python-slugify](http://pypi.python.org/pypi/python-slugify)
On Debian based distributions these two commands should install all dependencies: On Debian based distributions these two commands should install all dependencies:

View File

@@ -32,7 +32,7 @@ if sys.version_info[0] != 3:
missing = [] missing = []
try: try:
# noinspection PyUnresolvedReferences # noinspection PyUnresolvedReferences
from psutil import TOTAL_PHYMEM, Popen from psutil import virtual_memory, Popen
except ImportError: except ImportError:
missing.append('psutil') missing.append('psutil')
try: try:

2
kcc.py
View File

@@ -37,7 +37,7 @@ except ImportError:
missing.append('PyQt5') missing.append('PyQt5')
try: try:
# noinspection PyUnresolvedReferences # noinspection PyUnresolvedReferences
from psutil import TOTAL_PHYMEM, Popen from psutil import virtual_memory, Popen
except ImportError: except ImportError:
missing.append('psutil') missing.append('psutil')
try: try:

View File

@@ -36,7 +36,7 @@ from subprocess import STDOUT, PIPE
from PyQt5 import QtGui, QtCore, QtWidgets from PyQt5 import QtGui, QtCore, QtWidgets
from xml.dom.minidom import parse from xml.dom.minidom import parse
from html.parser import HTMLParser from html.parser import HTMLParser
from psutil import TOTAL_PHYMEM, Popen from psutil import virtual_memory, Popen
from .shared import md5Checksum from .shared import md5Checksum
from . import comic2ebook from . import comic2ebook
from . import kindlesplit from . import kindlesplit
@@ -338,7 +338,7 @@ class WorkerThread(QtCore.QThread):
self.kindlegenErrorCode = [0] self.kindlegenErrorCode = [0]
self.workerOutput = [] self.workerOutput = []
# Let's make sure that we don't fill the memory # Let's make sure that we don't fill the memory
availableMemory = TOTAL_PHYMEM/1000000000 availableMemory = virtual_memory().total/1000000000
if availableMemory <= 2: if availableMemory <= 2:
self.threadNumber = 1 self.threadNumber = 1
elif 2 < availableMemory <= 4: elif 2 < availableMemory <= 4:

View File

@@ -1,4 +0,0 @@
Pillow==2.3.0
Unidecode==0.04.14
psutil==1.2.1
python-slugify==0.0.7