diff mercurial/util.py @ 8118:35f7fda52c92

util: return boolean result directly in util.binary
author Martin Geisler <mg@lazybytes.net>
date Wed, 22 Apr 2009 17:14:58 +0200
parents 25b63941b17b
children bbc24c0753a0
line wrap: on
line diff
--- a/mercurial/util.py	Wed Apr 22 01:39:47 2009 +0200
+++ b/mercurial/util.py	Wed Apr 22 17:14:58 2009 +0200
@@ -223,9 +223,7 @@
 
 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"""