diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py
index bd4b7d1..c5abec3 100644
a
|
b
|
class NMSettingsConnection(dbus.service.Object): |
245 | 245 | config.set(identifier, 'uuid', self._settings.connection.uuid) |
246 | 246 | config.set(identifier, 'autoconnect', |
247 | 247 | self._settings.connection.autoconnect) |
248 | | config.set(identifier, 'timestamp', |
249 | | self._settings.connection.timestamp) |
| 248 | if self._settings.connection.timestamp is not None: |
| 249 | config.set(identifier, 'timestamp', |
| 250 | self._settings.connection.timestamp) |
250 | 251 | |
251 | 252 | if self._settings.wireless_security is not None: |
252 | 253 | if self._settings.wireless_security.key_mgmt is not None: |
… |
… |
def load_connections(): |
360 | 361 | settings.connection.uuid = uuid |
361 | 362 | nmtype = config.get(section, 'type') |
362 | 363 | settings.connection.type = nmtype |
363 | | autoconnect = bool(config.get(section, 'autoconnect')) |
| 364 | try: |
| 365 | autoconnect = config.getboolean(section, 'autoconnect') |
| 366 | except ValueError, e: |
| 367 | logging.error('Error reading section autoconnect: %s' % e) |
| 368 | continue |
364 | 369 | settings.connection.autoconnect = autoconnect |
365 | | timestamp = int(config.get(section, 'timestamp')) |
366 | | settings.connection.timestamp = timestamp |
| 370 | |
| 371 | if config.has_option(section, 'timestamp'): |
| 372 | try: |
| 373 | timestamp = config.getint(section, 'timestamp') |
| 374 | except ValueError, e: |
| 375 | logging.error('Error reading section timestamp: %s' % e) |
| 376 | continue |
| 377 | settings.connection.timestamp = timestamp |
367 | 378 | |
368 | 379 | secrets = None |
369 | 380 | if config.has_option(section, 'key-mgmt'): |
… |
… |
def load_connections(): |
389 | 400 | if config.has_option(section, 'pairwise'): |
390 | 401 | value = config.get(section, 'pairwise') |
391 | 402 | settings.wireless_security.pairwise = value |
| 403 | else: |
| 404 | logging.error('Error reading section key-mgmt: %s' % |
| 405 | mgmt) |
| 406 | continue |
392 | 407 | except ConfigParser.Error, e: |
393 | 408 | logging.error('Error reading section: %s' % e) |
394 | 409 | else: |