diff --git a/examdownloader-cli.py b/examdownloader-cli.py index 7db1173..c227a7d 100644 --- a/examdownloader-cli.py +++ b/examdownloader-cli.py @@ -23,10 +23,9 @@ def startDownload(args): def updateStatus(msg, type='normal'): print msg - def downloadCallback(status, lastfile='', numFiles=0): + def downloadCallback(status, numFiles=0): if status: updateStatus(str(numFiles) + ' papers downloaded successfully!', 'success') - subprocess.call(['open', '-R', lastfile]) else: updateStatus('Paper not released by Department', 'error') diff --git a/examdownloader-gui.py b/examdownloader-gui.py index f80a835..82406df 100644 --- a/examdownloader-gui.py +++ b/examdownloader-gui.py @@ -77,10 +77,9 @@ def startDownload(self): destination = self.destField.get() ed = examdownloader.examdownloader('GUI') - def downloadCallback(status, lastfile='', numFiles=0): + def downloadCallback(status, numFiles=0): if status: self.updateStatus(str(numFiles) + ' papers downloaded successfully!', 'success') - subprocess.call(['open', '-R', lastfile]) else: self.updateStatus('Paper not released by Department', 'error') diff --git a/examdownloader.py b/examdownloader.py index 3106391..8c87c88 100644 --- a/examdownloader.py +++ b/examdownloader.py @@ -120,7 +120,7 @@ def getContents(self, module, username, password, destination, downloadEndCallba return if 'filename' in vars(): - downloadEndCallback(True, filename, counter) + downloadEndCallback(True, counter) else: downloadEndCallback(False)