@@ -32,13 +32,13 @@ def select_location():
3232 location = directory
3333
3434def main ():
35- global location
36- root = tk .Tk ()
37- root .title ('Update - FileEncryption' )
35+ global location
36+ root = tk .Tk ()
37+ root .title ('Update - FileEncryption' )
3838 button_a = tk .Button (root , text = 'Select directory of FileEncryption.py' , command = select_location )
3939 label_b = tk .Label (root , text = location )
4040 pressed_c = tk .BooleanVar (False )
41- button_c = tk .Button (root , text = 'Update' , command = lambda : pressed_g .set (True ))
41+ button_c = tk .Button (root , text = 'Update' , command = lambda : pressed_c .set (True ))
4242 button_a .grid (row = 0 , column = 0 )
4343 label_b .grid (row = 1 , column = 0 )
4444 button_c .grid (row = 2 , column = 0 )
@@ -50,20 +50,20 @@ def main():
5050 location += '/'
5151 if os .path .exists (location + 'FileEncryption.py' ):
5252 continue_available = True
53- else :
53+ else :
5454 continue_available = False
5555 if continue_available :
5656 button_c .config (state = tk .NORMAL )
57- else :
57+ else :
5858 button_c .config (state = tk .DISABLED )
5959 if pressed_c .get ():
6060 loop = False
6161 with open (location + 'FileEncryption.py' , 'rb' ) as old_file :
62- old_content = old_file .read ()
62+ old_content = old_file .read ()
6363 with open (location + 'FileEncryption.py' , 'wb' ) as new_file :
64- new_file .write (old_content .replace (b'os.urandom(64)' , b'os.urandom(500)' ))
64+ new_file .write (old_content .replace (b'os.urandom(64)' , b'os.urandom(500)' ))
6565 messagebox .showinfo ('Success - FileEncryption' , 'Install successful: delete this updater' )
66- label_b .config (text = location )
66+ label_b .config (text = location )
6767 except tk .TclError :
6868 sys .exit (0 )
6969
0 commit comments