Skip to content
Merged
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 qubespdfconverter/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,8 +677,7 @@ def main(**params):
logging.basicConfig(format="error: %(message)s")

if params["files"]:
loop = asyncio.get_event_loop()
sys.exit(loop.run_until_complete(run(params)))
sys.exit(asyncio.run(run(params)))
else:
print("No files to sanitize.")

Expand Down
3 changes: 1 addition & 2 deletions qubespdfconverter/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,8 @@ def main():
pdf_path.write_bytes(data)
base = BaseFile(pdf_path)

loop = asyncio.get_event_loop()
try:
loop.run_until_complete(base.sanitize())
asyncio.run(base.sanitize())
except subprocess.CalledProcessError:
sys.exit(1)

Expand Down