Mercurial > libervia-backend
comparison sat/memory/memory.py @ 3031:98d1f34ce5b9
tools (config), memory: renamed SafeConfigParser following Python 3 port
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 16 Aug 2019 17:06:43 +0200 |
parents | ab2696e34d29 |
children | fee60f17ebac |
comparison
equal
deleted
inserted
replaced
3030:e80694d536d7 | 3031:98d1f34ce5b9 |
---|---|
24 log = getLogger(__name__) | 24 log = getLogger(__name__) |
25 | 25 |
26 import os.path | 26 import os.path |
27 import copy | 27 import copy |
28 from collections import namedtuple | 28 from collections import namedtuple |
29 from configparser import SafeConfigParser, NoOptionError, NoSectionError | 29 from configparser import ConfigParser, NoOptionError, NoSectionError |
30 from uuid import uuid4 | 30 from uuid import uuid4 |
31 from twisted.python import failure | 31 from twisted.python import failure |
32 from twisted.internet import defer, reactor, error | 32 from twisted.internet import defer, reactor, error |
33 from twisted.words.protocols.jabber import jid | 33 from twisted.words.protocols.jabber import jid |
34 from sat.core import exceptions | 34 from sat.core import exceptions |
227 def fixLocalDir(silent=True): | 227 def fixLocalDir(silent=True): |
228 """Retro-compatibility with the previous local_dir default value. | 228 """Retro-compatibility with the previous local_dir default value. |
229 | 229 |
230 @param silent (boolean): toggle logging output (must be True when called from sat.sh) | 230 @param silent (boolean): toggle logging output (must be True when called from sat.sh) |
231 """ | 231 """ |
232 user_config = SafeConfigParser() | 232 user_config = ConfigParser() |
233 try: | 233 try: |
234 user_config.read(C.CONFIG_FILES) | 234 user_config.read(C.CONFIG_FILES) |
235 except: | 235 except: |
236 pass # file is readable but its structure if wrong | 236 pass # file is readable but its structure if wrong |
237 try: | 237 try: |