mercurial/util.py
changeset 37099 6ca5f825a0ca
parent 37098 a9ea2b1e5c4b
child 37115 49d6ba67c93f
--- a/mercurial/util.py	Sat Mar 24 14:13:37 2018 +0900
+++ b/mercurial/util.py	Sat Mar 24 14:24:32 2018 +0900
@@ -67,6 +67,7 @@
 httplib = pycompat.httplib
 pickle = pycompat.pickle
 queue = pycompat.queue
+safehasattr = pycompat.safehasattr
 socketserver = pycompat.socketserver
 stderr = pycompat.stderr
 stdin = pycompat.stdin
@@ -177,9 +178,6 @@
 
 _notset = object()
 
-def safehasattr(thing, attr):
-    return getattr(thing, attr, _notset) is not _notset
-
 def _rapply(f, xs):
     if xs is None:
         # assume None means non-value of optional data