reformat
This commit is contained in:
parent
f0bcfc2f4d
commit
3848769108
1 changed files with 4 additions and 6 deletions
|
@ -7,7 +7,6 @@ import json
|
||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from subprocess import Popen, PIPE
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
import logging
|
import logging
|
||||||
|
@ -102,10 +101,10 @@ class ArchiveBackend:
|
||||||
|
|
||||||
def reserve(self, filename: Path) -> str:
|
def reserve(self, filename: Path) -> str:
|
||||||
bucketbase = re.sub(
|
bucketbase = re.sub(
|
||||||
r"""[^a-zA-Z0-9_.-]""", # based on what the archive.org documentation says
|
r"""[^a-zA-Z0-9_.-]""", # based on what the archive.org documentation says
|
||||||
"_",
|
"_",
|
||||||
filename.name.rsplit(".", maxsplit=1)[0]
|
filename.name.rsplit(".", maxsplit=1)[0],
|
||||||
)
|
)
|
||||||
if not bucketbase.startswith(f"{self.bucketprefix}-"):
|
if not bucketbase.startswith(f"{self.bucketprefix}-"):
|
||||||
bucketbase = f"{self.bucketprefix}-" + bucketbase
|
bucketbase = f"{self.bucketprefix}-" + bucketbase
|
||||||
bucketname = bucketbase
|
bucketname = bucketbase
|
||||||
|
@ -273,7 +272,6 @@ class Carichello:
|
||||||
def set_clipboard(self, text: str):
|
def set_clipboard(self, text: str):
|
||||||
subprocess.run(["xsel", "-bi"], input=text.encode("utf8"))
|
subprocess.run(["xsel", "-bi"], input=text.encode("utf8"))
|
||||||
|
|
||||||
|
|
||||||
def run(self) -> int:
|
def run(self) -> int:
|
||||||
try:
|
try:
|
||||||
ret = self._run()
|
ret = self._run()
|
||||||
|
|
Loading…
Reference in a new issue