pylint
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
from functools import partial
|
||||
from urllib.parse import urlparse
|
||||
from uuid import uuid4
|
||||
import asyncio
|
||||
@@ -61,12 +60,12 @@ class ConnectionHandler:
|
||||
if content == 'filename':
|
||||
try:
|
||||
return field.filename.encode('utf-8')
|
||||
except:
|
||||
except Exception:
|
||||
return b''
|
||||
elif content == 'content':
|
||||
try:
|
||||
return field.file.read()
|
||||
except:
|
||||
except Exception:
|
||||
return b''
|
||||
else:
|
||||
raise ValueError(f'Unknown content type {content!r}')
|
||||
@@ -236,11 +235,11 @@ async def run_init_script():
|
||||
})
|
||||
await shell_task.wait()
|
||||
|
||||
|
||||
async def start_background_tasks(app):
|
||||
app["debug_tasks"] = app.loop.create_task(run_init_script())
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
app = web.Application(client_max_size=1024**3)
|
||||
app.add_routes([
|
||||
|
||||
Reference in New Issue
Block a user