diff tests/test_util.py @ 917:6918f60d0e28

Merge hg 2.3 fixes from bos.
author Augie Fackler <raf@durin42.com>
date Sat, 21 Jul 2012 15:31:34 -0500
parents 772280aed751 7e9d805a0e1f
children 847953806c77
line wrap: on
line diff
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -161,11 +161,8 @@ def testui(stupid=False, layout='auto', 
     return u
 
 def dispatch(cmd):
-    try:
-        req = dispatchmod.request(cmd)
-        dispatchmod.dispatch(req)
-    except AttributeError, e:
-        dispatchmod.dispatch(cmd)
+    cmd = getattr(dispatchmod, 'request', lambda x: x)(cmd)
+    dispatchmod.dispatch(cmd)
 
 def rmtree(path):
     # Read-only files cannot be removed under Windows