hgext/schemes.py
changeset 30640 7a3e67bfa417
parent 29841 d5883fd055c6
child 31181 150cd5125722
--- a/hgext/schemes.py	Mon Dec 19 00:16:52 2016 +0530
+++ b/hgext/schemes.py	Mon Dec 19 00:28:12 2016 +0530
@@ -50,6 +50,7 @@
     error,
     extensions,
     hg,
+    pycompat,
     templater,
     util,
 )
@@ -114,7 +115,7 @@
     schemes.update(dict(ui.configitems('schemes')))
     t = templater.engine(lambda x: x)
     for scheme, url in schemes.items():
-        if (os.name == 'nt' and len(scheme) == 1 and scheme.isalpha()
+        if (pycompat.osname == 'nt' and len(scheme) == 1 and scheme.isalpha()
             and os.path.exists('%s:\\' % scheme)):
             raise error.Abort(_('custom scheme %s:// conflicts with drive '
                                'letter %s:\\\n') % (scheme, scheme.upper()))