Changeset 42:f23f648550e9 for src/mlx/config.py
- Timestamp:
- 03/10/12 16:20:55 (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
r40 r42 20 20 """Construct the configuration with default values.""" 21 21 22 self._pilotID = "" 23 self._password = "" 24 22 25 self._autoUpdate = True 23 26 self._updateURL = Config.DEFAULT_UPDATE_URL 24 27 25 28 self._modified = False 29 30 @property 31 def pilotID(self): 32 """Get the pilot ID.""" 33 return self._pilotID 34 35 @pilotID.setter 36 def pilotID(self, pilotID): 37 """Set the pilot ID.""" 38 if pilotID!=self._pilotID: 39 self._pilotID = pilotID 40 self._modified = True 41 42 @property 43 def password(self): 44 """Get the password.""" 45 return self._password 46 47 @password.setter 48 def password(self, password): 49 """Set the password.""" 50 if password!=self._password: 51 self._password = password 52 self._modified = True 26 53 27 54 @property … … 54 81 config.read(configPath) 55 82 83 self._pilotID = self._get(config, "login", "id", "") 84 self._password = self._get(config, "login", "password", "") 85 56 86 self._autoUpdate = self._getBoolean(config, "update", "auto", True) 57 87 self._updateURL = self._get(config, "update", "url", … … 65 95 66 96 config = ConfigParser.RawConfigParser() 97 98 config.add_section("login") 99 config.set("login", "id", self._pilotID) 100 config.set("login", "password", self._password) 67 101 68 102 config.add_section("update")
Note:
See TracChangeset
for help on using the changeset viewer.