-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpasswords.py
More file actions
30 lines (24 loc) · 736 Bytes
/
passwords.py
File metadata and controls
30 lines (24 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class Password:
def __init__(self, page, password):
self.page = page
self.password = password
# all the user passwords stored here
user_pass = []
def save_page(self):
Password.user_pass.append(self)
def delete_page(self):
Password.user_pass.remove(self)
# @TODO: Check created accounts
def display_page(cls):
return cls.user_pass
# @classmethod
def find_by_page(self, cls, pager):
for paged in cls.user_pass:
if paged.page == pager:
return paged
# @classmethod
def page_exists(cls, pager):
for paged in cls.user_pass:
if paged.page == pager:
return paged
return False