Skip to content
Snippets Groups Projects
Commit 234ffe5b authored by nimrod's avatar nimrod
Browse files

Revert "Added output to log file on every verification."

This reverts commit 726efa60.
parent 726efa60
Branches
No related tags found
No related merge requests found
......@@ -6,7 +6,6 @@ from PyQt4 import QtCore
from dcp import DCP
import ui
import sys
import os
class verifyThread(QtCore.QThread):
'''A seperate thread to verify the DCP (IO intensive).
......@@ -19,14 +18,10 @@ class verifyThread(QtCore.QThread):
result = dcp.verify()
try:
result = dcp.verify()
logfile = open (os.path.expanduser ('~') + '/dcpman.log', 'a')
if result:
window.verifyLine.setText('OK')
print ('DCP verification succeeded for ' + dcp.name, file = logfile)
else:
window.verifyLine.setText('Corrupted!')
print ('DCP verification failed for ' + dcp.name, file = logfile)
logfile.f ()
except BaseException as exception:
window.verifyLine.setText(str(exception))
......@@ -43,7 +38,6 @@ def verify_in_thread():
if __name__ == '__main__':
logfile = open (os.path.expanduser ('~') + '/dcpman.log', 'a')
app = QtGui.QApplication(sys.argv)
icon = QtGui.QIcon('/usr/share/icons/oxygen/16x16/apps/kmplayer.png')
app.setWindowIcon(icon)
......@@ -55,17 +49,10 @@ if __name__ == '__main__':
thread = verifyThread()
try:
dcp = DCP(directory)
print ('Opened DCP in directory ' + directory, file = logfile)
try:
window.nameLine.setText(dcp.name)
print ('DCP name is ' + dcp.name, file = logfile)
except AttributeError:
window.nameLine.setText(directory.split('/')[-1])
if dcp.signed:
print ('DCP is signed', file = logfile)
else:
print ('DCP is not signed', file = logfile)
print ('DCP duration is ' + dcp.duration, file = logfile)
if dcp.signed and dcp.duration == 0:
window.encryptedLine.setText('Most likely')
elif dcp.signed or dcp.duration == 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment