comparison sat/memory/params.py @ 2765:378188abe941

misc: replaced all "dummy" by the more conventional and readable "__" ("_" being used for gettext)
author Goffi <goffi@goffi.org>
date Fri, 11 Jan 2019 11:13:15 +0100
parents e9cd473a2f46
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2764:92af49cde255 2765:378188abe941
292 continue 292 continue
293 node.setAttribute("app", app) 293 node.setAttribute("app", app)
294 if ( 294 if (
295 len(cat_node.childNodes) == to_remove_count 295 len(cat_node.childNodes) == to_remove_count
296 ): # remove empty category 296 ): # remove empty category
297 for dummy in xrange(0, to_remove_count): 297 for __ in xrange(0, to_remove_count):
298 to_remove.pop() 298 to_remove.pop()
299 to_remove.append(cat_node) 299 to_remove.append(cat_node)
300 for node in to_remove: 300 for node in to_remove:
301 node.parentNode.removeChild(node) 301 node.parentNode.removeChild(node)
302 302
712 names_d_list.append(d) 712 names_d_list.append(d)
713 break 713 break
714 714
715 prof_xml.unlink() 715 prof_xml.unlink()
716 dlist = defer.gatherResults(names_d_list) 716 dlist = defer.gatherResults(names_d_list)
717 dlist.addCallback(lambda dummy: ret) 717 dlist.addCallback(lambda __: ret)
718 return ret 718 return ret
719 719
720 d = self._constructProfileXml(security_limit, "", profile) 720 d = self._constructProfileXml(security_limit, "", profile)
721 return d.addCallback(returnCategoryXml) 721 return d.addCallback(returnCategoryXml)
722 722
1069 data_value=personal_key, 1069 data_value=personal_key,
1070 crypto_key=value, 1070 crypto_key=value,
1071 profile=profile, 1071 profile=profile,
1072 ) 1072 )
1073 d.addCallback( 1073 d.addCallback(
1074 lambda dummy: PasswordHasher.hash(value) 1074 lambda __: PasswordHasher.hash(value)
1075 ) # profile password is hashed (empty value stays empty) 1075 ) # profile password is hashed (empty value stays empty)
1076 elif value: # other non empty passwords are encrypted with the personal key 1076 elif value: # other non empty passwords are encrypted with the personal key
1077 d = BlockCipher.encrypt(personal_key, value) 1077 d = BlockCipher.encrypt(personal_key, value)
1078 else: 1078 else:
1079 d = defer.succeed(value) 1079 d = defer.succeed(value)