diff hgext/largefiles/lfutil.py @ 15169:aa262fff87ac

largefile: fix up hasattr usage
author Matt Mackall <mpm@selenic.com>
date Thu, 29 Sep 2011 16:48:48 -0500
parents cfccd3bee7b3
children c1a4a3220711
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Sat Sep 24 17:35:45 2011 +0200
+++ b/hgext/largefiles/lfutil.py	Thu Sep 29 16:48:48 2011 -0500
@@ -170,7 +170,7 @@
     except ImportError:
         # Mercurial <= 1.8
         opener = util.opener(admin)
-    if hasattr(repo.dirstate, '_validate'):
+    if util.safehasattr(repo.dirstate, '_validate'):
         lfdirstate = largefiles_dirstate(opener, ui, repo.root,
             repo.dirstate._validate)
     else: