Changeset 43:f5c93554d51c for src/mlx/config.py
- Timestamp:
- 03/10/12 16:31:28 (12 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/config.py
r42 r43 4 4 5 5 import os 6 import sys 6 7 import ConfigParser 7 8 … … 105 106 106 107 try: 107 with open(configPath, "wt") as f: 108 fd = os.open(configPath, os.O_CREAT|os.O_TRUNC|os.O_WRONLY, 109 0600) 110 with os.fdopen(fd, "wt") as f: 108 111 config.write(f) 109 112 self._modified = False 110 113 except Exception, e: 111 print >> sys.stderr ("Failed to update config: " + str(e))114 print >> sys.stderr, "Failed to update config: " + str(e) 112 115 113 116 def _getBoolean(self, config, section, option, default):
Note:
See TracChangeset
for help on using the changeset viewer.