@@ -14,7 +14,7 @@ def __init__(self, file_name):
1414 1 - Yeni parola oluştur
1515 2 - Parolaları listele
1616 3 - Parola ara
17- """ ,is_numeric = True )
17+ """ , is_numeric = True )
1818 if menu == 1 :
1919 self .register_new_pass ()
2020 elif menu == 2 :
@@ -25,11 +25,8 @@ def __init__(self, file_name):
2525 else :
2626 print ('Hatalı Girdi' )
2727
28-
29-
30- def input_control_error (self ,text ,is_numeric = False ):
31- input_error = True
32- while input_error :
28+ def input_control_error (self , text , is_numeric = False ):
29+ while True :
3330 input_data = input (text )
3431 if input_data .strip () != "" :
3532 if is_numeric :
@@ -42,8 +39,6 @@ def input_control_error(self,text,is_numeric=False):
4239 else :
4340 print ('Geçersiz girdi' )
4441
45-
46-
4742 def register_new_pass (self ):
4843 """
4944 Kullanıcıdan kullanıcı adı , açıklama ve parola ister
@@ -53,19 +48,20 @@ def register_new_pass(self):
5348 username = self .input_control_error ("Lütfen Kullanıcı adı giriniz :" )
5449 password = input ("Lütfen parolanızı giriniz:" )
5550 if password .strip () == "" :
56- password_length = self .input_control_error ('Lütfen parola uzunluğu giriniz' ,is_numeric = True )
51+ password_length = self .input_control_error ('Lütfen parola uzunluğu giriniz' , is_numeric = True )
5752 password = self .generate_pass (password_length )
5853 aciklama = self .input_control_error ("Lütfen açıklama giriniz :" )
5954
60-
61-
62- self .mypasslist .append ({"username" :username ,"password" :password ,"description" :aciklama })
55+ self .mypasslist .append ({"username" : username , "password" : password , "description" : aciklama })
6356 self .save ()
6457
65- def edit (self ):
58+ def edit (self , text , is_numeric = False ):
6659 """
6760 verilen index'te olan veriyi değiştirir
6861 """
62+ print ('Edit çağrıldı' )
63+
64+
6965
7066 def load (self ):
7167 """
@@ -88,7 +84,7 @@ def list(self):
8884 for passlist in self .mypasslist :
8985 print (list (passlist .values ()))
9086
91- def search (self ,keyw ):
87+ def search (self , keyw ):
9288 """
9389 vericeğimiz parametreye göre parolalar arasında arama yapacak
9490 """
@@ -102,8 +98,9 @@ def save(self):
10298 """
10399 data = ""
104100 for i in self .mypasslist :
105- data += "{username}@ayrac@{passw}@ayrac@{desc}\n " .format (username = i .get ('username' ),passw = i .get ('password' ),desc = i .get ('description' ))
106- with open (self .file_name ,"w" ) as file :
101+ data += "{username}@ayrac@{passw}@ayrac@{desc}\n " .format (username = i .get ('username' ),
102+ passw = i .get ('password' ), desc = i .get ('description' ))
103+ with open (self .file_name , "w" ) as file :
107104 file .write (data )
108105
109106 def generate_pass (self , length ):
0 commit comments