by
Changes to one file · Browse files at a90ac18314da Showing diff from parent 3f73cd16cdb0 1113418ed4f2 Diff from another changeset...
@@ -1054,10 +1054,15 @@ if os.path.exists(fn):
break
else:
- fn = rcpath[0]
- f = open(fn, 'w')
- f.write(_('# Generated by tortoisehg-config\n'))
- f.close()
+ for fn in rcpath:
+ # Try to create a file from rcpath
+ try:
+ f = open(fn, 'w')
+ f.write(_('# Generated by tortoisehg-config\n'))
+ f.close()
+ break
+ except (IOError, OSError):
+ pass
self.fn = fn
try:
import iniparse
|
Loading...