diff easyhg.py @ 503:1e735168df81

Encountering some peculiar problems with platform... but it's overkill for this anyway, use os.name instead
author Chris Cannam
date Thu, 15 Sep 2011 14:24:37 +0100
parents 0714a86b8077
children 533519ebc0cb
line wrap: on
line diff
--- a/easyhg.py	Tue Aug 23 12:05:48 2011 +0100
+++ b/easyhg.py	Thu Sep 15 14:24:37 2011 +0100
@@ -13,7 +13,7 @@
 #    License, or (at your option) any later version.  See the file
 #    COPYING included with this distribution for more information.
 
-import sys, os, stat, urllib, urllib2, urlparse, platform, hashlib
+import sys, os, stat, urllib, urllib2, urlparse, hashlib
 
 from mercurial.i18n import _
 from mercurial import ui, util, error
@@ -135,7 +135,7 @@
         except:
             self.ui.write("failed to open authfile %s for writing\n" % self.auth_file)
             raise
-        if platform.system() != 'Windows':
+        if os.name == 'posix':
             try:
                 os.fchmod(ofp.fileno(), stat.S_IRUSR | stat.S_IWUSR)
             except: