comparison src/memory/memory.py @ 483:655695f85e5b

core: fixed bad try/except block in memory
author Goffi <goffi@goffi.org>
date Sun, 12 Aug 2012 15:49:08 +0200
parents 2a072735e459
children 385cd2169eb5
comparison
equal deleted inserted replaced
482:e0d1eed4a46b 483:655695f85e5b
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
526 """ 525 """
527 if not section: 526 if not section:
528 section='DEFAULT' 527 section='DEFAULT'
529 try: 528 try:
530 _value = self.config.get(section, name) 529 _value = self.config.get(section, name)
531 except NoOptionError, NoSectionError: 530 except (NoOptionError, NoSectionError):
532 _value = '' 531 _value = ''
533 532
534 return os.path.expanduser(_value) if name.endswith('_path') or name.endswith('_dir') else _value 533 return os.path.expanduser(_value) if name.endswith('_path') or name.endswith('_dir') else _value
535 534
536 535