Skip to content

Commit

Permalink
#812 convert to string before doing anything else, so we do it just once
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@22503 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 22, 2019
1 parent d90ac3b commit 33b90a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/xpra/clipboard/clipboard_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 33b90a1

Please sign in to comment.