comparison src/memory/memory.py @ 844:f3513c8cc2e6

misc: fix unnamed arguments in format strings
author souliane <souliane@mailoo.org>
date Mon, 17 Feb 2014 14:58:26 +0100
parents 9bac2fc74968
children c2f6ada7858f
comparison
equal deleted inserted replaced
843:efd92a645220 844:f3513c8cc2e6
471 if not node: 471 if not node:
472 error(_("Requested param [%(name)s] in category [%(category)s] doesn't exist !") % {'name': name, 'category': category}) 472 error(_("Requested param [%(name)s] in category [%(category)s] doesn't exist !") % {'name': name, 'category': category})
473 return None 473 return None
474 474
475 if not self.checkSecurityLimit(node[1], security_limit): 475 if not self.checkSecurityLimit(node[1], security_limit):
476 warning(_("Trying to get parameter '%s' in category '%s' without authorization!!!" 476 warning(_("Trying to get parameter '%(param)s' in category '%(cat)s' without authorization!!!"
477 % (name, category))) 477 % {'param': name, 'cat': category}))
478 return None 478 return None
479 479
480 if node[0] == GENERAL: 480 if node[0] == GENERAL:
481 value = self._getParam(category, name, GENERAL) 481 value = self._getParam(category, name, GENERAL)
482 return defer.succeed(self._getAttr(node[1], attr, value)) 482 return defer.succeed(self._getAttr(node[1], attr, value))
718 error(_('Requesting an unknown parameter (%(category)s/%(name)s)') 718 error(_('Requesting an unknown parameter (%(category)s/%(name)s)')
719 % {'category': category, 'name': name}) 719 % {'category': category, 'name': name})
720 return 720 return
721 721
722 if not self.checkSecurityLimit(node[1], security_limit): 722 if not self.checkSecurityLimit(node[1], security_limit):
723 warning(_("Trying to set parameter '%s' in category '%s' without authorization!!!" 723 warning(_("Trying to set parameter '%(param)s' in category '%(cat)s' without authorization!!!"
724 % (name, category))) 724 % {'param': name, 'cat': category}))
725 return 725 return
726 726
727 if node[0] == GENERAL: 727 if node[0] == GENERAL:
728 self.params_gen[(category, name)] = value 728 self.params_gen[(category, name)] = value
729 self.storage.setGenParam(category, name, value) 729 self.storage.setGenParam(category, name, value)