diff --git a/carichello.py b/carichello.py index 7a11a13..34775a7 100644 --- a/carichello.py +++ b/carichello.py @@ -7,7 +7,6 @@ import json from base64 import b64encode from pathlib import Path from argparse import ArgumentParser -from subprocess import Popen, PIPE import subprocess import tempfile import logging @@ -102,10 +101,10 @@ class ArchiveBackend: def reserve(self, filename: Path) -> str: bucketbase = re.sub( - r"""[^a-zA-Z0-9_.-]""", # based on what the archive.org documentation says - "_", - filename.name.rsplit(".", maxsplit=1)[0] - ) + r"""[^a-zA-Z0-9_.-]""", # based on what the archive.org documentation says + "_", + filename.name.rsplit(".", maxsplit=1)[0], + ) if not bucketbase.startswith(f"{self.bucketprefix}-"): bucketbase = f"{self.bucketprefix}-" + bucketbase bucketname = bucketbase @@ -273,7 +272,6 @@ class Carichello: def set_clipboard(self, text: str): subprocess.run(["xsel", "-bi"], input=text.encode("utf8")) - def run(self) -> int: try: ret = self._run()