removing unnecessary whitespace

This commit is contained in:
Micah Lee 2014-09-16 00:22:14 +00:00
parent 8f493b4468
commit 8cdecbcaf4
2 changed files with 4 additions and 4 deletions

View File

@ -164,7 +164,7 @@ def download(slug_candidate):
r = Response(generate())
r.headers.add('Content-Length', zip_filesize)
r.headers.add('Content-Disposition', 'attachment', filename=basename)
# guess content type
(content_type, _) = mimetypes.guess_type(basename, strict=False)
if content_type is not None:
@ -182,7 +182,7 @@ shutdown_slug = helpers.random_string(16)
def shutdown(shutdown_slug_candidate):
if not helpers.constant_time_compare(shutdown_slug.encode('ascii'), shutdown_slug_candidate.encode('ascii')):
abort(404)
# shutdown the flask service
func = request.environ.get('werkzeug.server.shutdown')
if func is None:

View File

@ -91,7 +91,7 @@ class FileList(QtGui.QListWidget):
size = self.human_readable_filesize(helpers.dir_size(filename))
item = QtGui.QListWidgetItem('{0} ({1})'.format(basename, size))
item.setToolTip(QtCore.QString(size))
item.setIcon(icon)
self.addItem(item)
@ -180,7 +180,7 @@ class FileSelection(QtGui.QVBoxLayout):
self.server_on = True
self.file_list.setAcceptDrops(False)
self.update()
def server_stopped(self):
self.server_on = False
self.file_list.setAcceptDrops(True)