# HG changeset patch # User Martin Geisler # Date 2009-04-22 15:14:58 # Node ID 35f7fda52c929013aecb846103f1e2483d725877 # Parent 2b30d8488819e176d96ed82d80d1ddb70e110131 util: return boolean result directly in util.binary diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -223,9 +223,7 @@ def filter(s, cmd): def binary(s): """return true if a string is binary data""" - if s and '\0' in s: - return True - return False + return bool(s and '\0' in s) def unique(g): """return the uniq elements of iterable g"""