diff tests/test-walkrepo.py @ 14971:0b21ae0a2366

tests: use getattr instead of hasattr
author Augie Fackler <durin42@gmail.com>
date Mon, 25 Jul 2011 16:37:18 -0500
parents 938fbeacac84
children e1615a24b73a
line wrap: on
line diff
--- a/tests/test-walkrepo.py	Mon Jul 25 16:05:01 2011 -0500
+++ b/tests/test-walkrepo.py	Mon Jul 25 16:37:18 2011 -0500
@@ -5,7 +5,7 @@
 from os.path import join as pjoin
 
 u = ui.ui()
-sym = hasattr(os, 'symlink') and hasattr(os.path, 'samestat')
+sym = getattr(os, 'symlink', False) and getattr(os.path, 'samestat', False)
 
 hg.repository(u, 'top1', create=1)
 mkdir('subdir')