Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examdownloader-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
3 changes: 1 addition & 2 deletions examdownloader-gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion examdownloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down