1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 09:46:25 +00:00

Little code cleanup

This commit is contained in:
Paweł Jastrzębski
2013-09-11 15:22:18 +02:00
parent 4c96de9cdf
commit a28ad2b0c7
5 changed files with 4 additions and 5 deletions

1
kcc.py
View File

@@ -32,7 +32,6 @@ except ImportError:
exit(1)
from kcc import KCC_gui
from multiprocessing import freeze_support
if sys.platform == 'darwin':
os.environ['PATH'] = '/usr/local/bin:' + os.environ['PATH']
from kcc import KCC_ui_osx as KCC_ui

View File

@@ -111,7 +111,6 @@ class WorkerThread(QtCore.QThread):
self.emit(QtCore.SIGNAL("addMessage"), '<b>Conversion interrupted.</b>', 'error')
self.emit(QtCore.SIGNAL("modeConvert"), True)
# noinspection PyUnboundLocalVariable
def run(self):
self.emit(QtCore.SIGNAL("modeConvert"), False)
profile = ProfileData.ProfileLabels[str(GUI.DeviceBox.currentText())]

View File

@@ -689,6 +689,7 @@ def getDirectorySize(start_path='.'):
return total_size
# noinspection PyUnusedLocal
def createNewTome(parentPath):
tomePathRoot = tempfile.mkdtemp('', 'KCC-TMP-')
#tomePathRoot = tempfile.mkdtemp('', 'KCC-TMP-', parentPath)

View File

@@ -28,7 +28,7 @@ from shutil import rmtree, copytree, move
from optparse import OptionParser, OptionGroup
from multiprocessing import Pool, Queue, freeze_support
try:
# noinspection PyUnresolvedReferences,PyPackageRequirements
# noinspection PyUnresolvedReferences
from PIL import Image, ImageStat
except ImportError:
print "ERROR: Pillow is not installed!"
@@ -137,7 +137,7 @@ def splitImage(work):
filePath = os.path.join(path, name)
# Detect corrupted files
try:
image = Image.open(filePath)
Image.open(filePath)
except IOError:
raise RuntimeError('Cannot read image file %s' % filePath)
try:

View File

@@ -21,7 +21,7 @@ __docformat__ = 'restructuredtext en'
import os
try:
# noinspection PyUnresolvedReferences,PyPackageRequirements
# noinspection PyUnresolvedReferences
from PIL import Image, ImageOps, ImageStat, ImageChops
except ImportError:
print "ERROR: Pillow is not installed!"