From: Brandon Casey <>

Python 2.5 and older do not accept None as the first argument to
translate() and complain with:

   TypeError: expected a character buffer object

As suggested by Pete Wyckoff, let's just replace the call to translate()
with a regex search which should be more clear and more portable.

This allows git-p4 to be used with Python 2.5.

Signed-off-by: Brandon Casey <>
 INSTALL   | 2 +- | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/INSTALL b/INSTALL
index 28f34bd..fc723b3 100644
@@ -131,7 +131,7 @@ Issues of note:
          use English. Under autoconf the configure script will do this
          automatically if it can't find libintl on the system.
-       - Python version 2.6 or later is needed to use the git-p4
+       - Python version 2.5 or later is needed to use the git-p4
          interface to Perforce.
  - Some platform specific issues are dealt with Makefile rules,
diff --git a/ b/
index 2da5649..de1a0b9 100755
--- a/
+++ b/
@@ -768,7 +768,8 @@ def wildcard_encode(path):
     return path
 def wildcard_present(path):
-    return path.translate(None, "*#@%") != path
+    m ="[*#@%]", path)
+    return m is not None
 class Command:
     def __init__(self):

This email message is for the sole use of the intended recipient(s) and may 
confidential information.  Any unauthorized review, use, disclosure or 
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to