diff hgext/largefiles/lfutil.py @ 34646:238abf65a8ad

codemod: use pycompat.isposix This is done by: sed -i "s/pycompat\.osname == 'posix'/pycompat.isposix/" **/*.py Differential Revision: https://phab.mercurial-scm.org/D1036
author Jun Wu <quark@fb.com>
date Thu, 12 Oct 2017 09:04:22 -0700
parents 75979c8d4572
children dacfcdd8b94e
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Thu Oct 12 23:30:46 2017 -0700
+++ b/hgext/largefiles/lfutil.py	Thu Oct 12 09:04:22 2017 -0700
@@ -83,7 +83,7 @@
         home = encoding.environ.get('HOME')
         if home:
             return os.path.join(home, 'Library', 'Caches', longname)
-    elif pycompat.osname == 'posix':
+    elif pycompat.isposix:
         path = encoding.environ.get('XDG_CACHE_HOME')
         if path:
             return os.path.join(path, longname)