comparison src/memory/memory.py @ 494:385cd2169eb5

core: memory bug fix
author Goffi <goffi@goffi.org>
date Fri, 17 Aug 2012 03:20:40 +0200
parents 0d9908ac775e 655695f85e5b
children 65ecbb473cbb
comparison
equal deleted inserted replaced
493:b7c4bb2c0668 494:385cd2169eb5
20 """ 20 """
21 21
22 from __future__ import with_statement 22 from __future__ import with_statement
23 23
24 import os.path 24 import os.path
25 import time
26 from ConfigParser import SafeConfigParser, NoOptionError, NoSectionError 25 from ConfigParser import SafeConfigParser, NoOptionError, NoSectionError
27 from xml.dom import minidom 26 from xml.dom import minidom
28 from logging import debug, info, warning, error 27 from logging import debug, info, warning, error
29 from twisted.internet import defer 28 from twisted.internet import defer
30 from twisted.words.protocols.jabber import jid 29 from twisted.words.protocols.jabber import jid
522 """ 521 """
523 if not section: 522 if not section:
524 section='DEFAULT' 523 section='DEFAULT'
525 try: 524 try:
526 _value = self.config.get(section, name) 525 _value = self.config.get(section, name)
527 except NoOptionError, NoSectionError: 526 except (NoOptionError, NoSectionError):
528 _value = '' 527 _value = ''
529 528
530 return os.path.expanduser(_value) if name.endswith('_path') or name.endswith('_dir') else _value 529 return os.path.expanduser(_value) if name.endswith('_path') or name.endswith('_dir') else _value
531 530
532 531