Add remove duplicate passwords
This commit is contained in:
parent
5eb5361a51
commit
d080342c78
1 changed files with 8 additions and 0 deletions
|
@ -969,6 +969,14 @@ class NcPasswordClient:
|
||||||
self.nc.delete_password(item)
|
self.nc.delete_password(item)
|
||||||
|
|
||||||
def remove_duplicates(self):
|
def remove_duplicates(self):
|
||||||
|
'''Remove duplicate passwords'''
|
||||||
|
checked_passwords = []
|
||||||
|
for item in self.nc.list_passwords():
|
||||||
|
for checked in checked_passwords:
|
||||||
|
if self.nc.is_same_password(checked, item):
|
||||||
|
self.nc.delete_password(item)
|
||||||
|
break
|
||||||
|
checked_passwords.append(item)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _init_log(self):
|
def _init_log(self):
|
||||||
|
|
Loading…
Reference in a new issue