Changeset 43:f5c93554d51c for src/mlx


Ignore:
Timestamp:
03/10/12 16:31:28 (13 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The config file is saved with restrictive permissions

Location:
src/mlx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/config.py

    r42 r43  
    44
    55import os
     6import sys
    67import ConfigParser
    78
     
    105106
    106107        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:
    108111                config.write(f)
    109112            self._modified = False
    110113        except Exception, e:
    111             print >> sys.stderr("Failed to update config: " + str(e))
     114            print >> sys.stderr, "Failed to update config: " + str(e)
    112115
    113116    def _getBoolean(self, config, section, option, default):
  • src/mlx/gui/flight.py

    r42 r43  
    9797                config.pilotID = self._pilotID.get_text()
    9898                config.password = self._password.get_text()
     99                config.save()
    99100                self._wizard.nextPage()
    100101            else:
Note: See TracChangeset for help on using the changeset viewer.