diff --git a/copyparty/broker_mp.py b/copyparty/broker_mp.py index b1da0022..f4d15050 100644 --- a/copyparty/broker_mp.py +++ b/copyparty/broker_mp.py @@ -110,7 +110,7 @@ class BrokerMp(object): obj = getattr(obj, node) # TODO will deadlock if dest performs another ipc - rv = try_exec(obj, *args, want_retval=retq_id) + rv = try_exec(retq_id, obj, *args) if retq_id: proc.q_pend.put([retq_id, "retq", rv]) diff --git a/copyparty/broker_thr.py b/copyparty/broker_thr.py index fd7a30c7..189aaffd 100644 --- a/copyparty/broker_thr.py +++ b/copyparty/broker_thr.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # coding: utf-8 from __future__ import print_function, unicode_literals @@ -39,7 +38,7 @@ class BrokerThr(object): obj = getattr(obj, node) # TODO will deadlock if dest performs another ipc - rv = try_exec(obj, *args, want_retval=want_retval) + rv = try_exec(want_retval, obj, *args) if not want_retval: return diff --git a/copyparty/broker_util.py b/copyparty/broker_util.py index 4a36bffc..b635f600 100644 --- a/copyparty/broker_util.py +++ b/copyparty/broker_util.py @@ -13,7 +13,7 @@ else: from Queue import Queue # pylint: disable=import-error,no-name-in-module -class ExceptionalQueue(Queue): +class ExceptionalQueue(Queue, object): def get(self, block=True, timeout=None): rv = super(ExceptionalQueue, self).get(block, timeout) @@ -28,7 +28,7 @@ class ExceptionalQueue(Queue): return rv -def try_exec(func, *args, want_retval=False): +def try_exec(want_retval, func, *args): try: return func(*args) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index e7ede88f..bc4447aa 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -633,8 +633,8 @@ class HttpCli(object): logues = [None, None] for n, fn in enumerate([".prologue.html", ".epilogue.html"]): fn = os.path.join(abspath, fn) - if os.path.exists(fn): - with open(fn, "rb") as f: + if os.path.exists(fsenc(fn)): + with open(fsenc(fn), "rb") as f: logues[n] = f.read().decode("utf-8") ts = "" diff --git a/copyparty/up2k.py b/copyparty/up2k.py index e7e3f65e..6d744538 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -114,7 +114,9 @@ class Up2k(object): raise Pebkac(400, "at least one hash is not according to spec") # server-reproducible file identifier, independent of name or location - ident = "\n".join([self.salt, str(cj["size"]), *cj["hash"]]) + ident = [self.salt, str(cj["size"])] + ident.extend(cj["hash"]) + ident = "\n".join(ident) hasher = hashlib.sha512() hasher.update(ident.encode("utf-8")) diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index e2f98934..3e89f0b1 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -164,12 +164,10 @@ function up2k_init(have_crypto) { var parallel_uploads = cfg('nthread'); - var col_hashing = '#0099ff'; //'#d7d7d7'; - //var col_hashed = '#e8a6df'; //'#decb7f'; - //var col_hashed = '#0099ff'; - var col_hashed = '#eeeeee'; + var col_hashing = '#0099ff'; + var col_hashed = '#004466'; var col_uploading = '#ffcc44'; - var col_uploaded = '#00cc00'; + var col_uploaded = '#00bb00'; var fdom_ctr = 0; var st = { "files": [], diff --git a/copyparty/web/upload.css b/copyparty/web/upload.css index efe8ff6f..37fafdde 100644 --- a/copyparty/web/upload.css +++ b/copyparty/web/upload.css @@ -137,7 +137,7 @@ padding: 0; height: 1.1em; margin-bottom: -.15em; - box-shadow: -.1em -.1em .2em inset rgba(0,0,0,0.2); + box-shadow: -1px -1px 0 inset rgba(255,255,255,0.1); } .prog>div>div { width: 0%;