From 33b90a19f9bc6dbe273a7d8ac4797a2e98a34bf3 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 22 Apr 2019 11:44:30 +0000 Subject: [PATCH] #812 convert to string before doing anything else, so we do it just once git-svn-id: https://xpra.org/svn/Xpra/trunk@22503 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/clipboard/clipboard_core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xpra/clipboard/clipboard_core.py b/src/xpra/clipboard/clipboard_core.py index ebe9d3f36c..6b8cfac681 100644 --- a/src/xpra/clipboard/clipboard_core.py +++ b/src/xpra/clipboard/clipboard_core.py @@ -77,14 +77,14 @@ def get_discard_targets(envname="DISCARD", default_value=()): def must_discard(target): - return any(x for x in DISCARD_TARGETS if x.match(bytestostr(target))) + return any(x for x in DISCARD_TARGETS if x.match(target)) def must_discard_extra(target): - return any(x for x in DISCARD_EXTRA_TARGETS if x.match(bytestostr(target))) + return any(x for x in DISCARD_EXTRA_TARGETS if x.match(target)) def _filter_targets(targets): - f = tuple(target for target in targets if not must_discard(target)) + f = tuple(target for target in (bytestostr(x) for x in targets) if not must_discard(target)) log("_filter_targets(%s)=%s", targets, f) return f