This commit is contained in:
ed 2023-12-14 10:47:52 +00:00
parent b1693f95cb
commit cba2e10d29
7 changed files with 126 additions and 129 deletions

View file

@ -112,8 +112,6 @@ class HttpConn(object):
return self.u2idx return self.u2idx
def _detect_https(self) -> bool: def _detect_https(self) -> bool:
method = None
if True:
try: try:
method = self.s.recv(4, socket.MSG_PEEK) method = self.s.recv(4, socket.MSG_PEEK)
except socket.timeout: except socket.timeout:

View file

@ -61,7 +61,7 @@ class Adapter(object):
) )
if True: if True: # pylint: disable=using-constant-test
# Type of an IPv4 address (a string in "xxx.xxx.xxx.xxx" format) # Type of an IPv4 address (a string in "xxx.xxx.xxx.xxx" format)
_IPv4Address = str _IPv4Address = str

View file

@ -419,7 +419,6 @@ class Up2k(object):
def _check_lifetimes(self) -> float: def _check_lifetimes(self) -> float:
now = time.time() now = time.time()
timeout = now + 9001 timeout = now + 9001
if now: # diff-golf
for vp, vol in sorted(self.asrv.vfs.all_vols.items()): for vp, vol in sorted(self.asrv.vfs.all_vols.items()):
lifetime = vol.flags.get("lifetime") lifetime = vol.flags.get("lifetime")
if not lifetime: if not lifetime:
@ -1217,8 +1216,6 @@ class Up2k(object):
abspath = os.path.join(cdir, fn) abspath = os.path.join(cdir, fn)
nohash = reh.search(abspath) if reh else False nohash = reh.search(abspath) if reh else False
if fn: # diff-golf
sql = "select w, mt, sz, at from up where rd = ? and fn = ?" sql = "select w, mt, sz, at from up where rd = ? and fn = ?"
try: try:
c = db.c.execute(sql, (rd, fn)) c = db.c.execute(sql, (rd, fn))

View file

@ -1823,7 +1823,9 @@ def exclude_dotfiles(filepaths: list[str]) -> list[str]:
return [x for x in filepaths if not x.split("/")[-1].startswith(".")] return [x for x in filepaths if not x.split("/")[-1].startswith(".")]
def odfusion(base: Union[ODict[str, bool], ODict["LiteralString", bool]], oth: str) -> ODict[str, bool]: def odfusion(
base: Union[ODict[str, bool], ODict["LiteralString", bool]], oth: str
) -> ODict[str, bool]:
# merge an "ordered set" (just a dict really) with another list of keys # merge an "ordered set" (just a dict really) with another list of keys
words0 = [x for x in oth.split(",") if x] words0 = [x for x in oth.split(",") if x]
words1 = [x for x in oth[1:].split(",") if x] words1 = [x for x in oth[1:].split(",") if x]

View file

@ -19,7 +19,7 @@ docker run --rm -it -u 1000 -p 3923:3923 -v /mnt/nas:/w -v $PWD/cfgdir:/cfg copy
this example is also available as a podman-compatible [docker-compose yaml](https://github.com/9001/copyparty/blob/hovudstraum/docs/examples/docker/basic-docker-compose); example usage: `docker-compose up` (you may need to `systemctl enable --now podman.socket` or similar) this example is also available as a podman-compatible [docker-compose yaml](https://github.com/9001/copyparty/blob/hovudstraum/docs/examples/docker/basic-docker-compose); example usage: `docker-compose up` (you may need to `systemctl enable --now podman.socket` or similar)
i'm unfamiliar with docker-compose and alternatives so let me know if this section could be better 🙏 i'm not very familiar with containers, so let me know if this section could be better 🙏
## configuration ## configuration