##// END OF EJS Templates
cleanup: replace hasattr() usage with getattr() in hghave
Brodie Rao -
r16685:43d55088 default
parent child Browse files
Show More
@@ -106,7 +106,7 b' def has_inotify():'
106 106 return False
107 107
108 108 def has_fifo():
109 return hasattr(os, "mkfifo")
109 return getattr(os, "mkfifo", None) is not None
110 110
111 111 def has_cacheable_fs():
112 112 from mercurial import util
@@ -169,7 +169,7 b' def has_p4():'
169 169 matchoutput('p4d -V', r'Rev\. P4D/'))
170 170
171 171 def has_symlink():
172 if not hasattr(os, "symlink"):
172 if getattr(os, "symlink", None) is None:
173 173 return False
174 174 name = tempfile.mktemp(dir=".", prefix='hg-checklink-')
175 175 try:
General Comments 0
You need to be logged in to leave comments. Login now