Skip to content

Commit 5ec43ba

Browse files
committed
Add namespace to file_utils functions
1 parent 96e8bd4 commit 5ec43ba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

file-operations/file_encrypt.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import argparse
22
import caesar_cipher
3-
from file_utils import get_file_content, store_file_content
3+
import file_utils
44

55
def main():
66

@@ -22,10 +22,10 @@ def main():
2222
def encrypt(file, key):
2323

2424
try:
25-
file_content = get_file_content(file)
25+
file_content = file_utils.get_file_content(file)
2626

2727
if file_content:
28-
new_file = store_file_content(caesar_cipher.encrypt(file_content, key), 'encriptado.txt')
28+
new_file = file_utils.store_file_content(caesar_cipher.encrypt(file_content, key), 'encriptado.txt')
2929
print(f'content stored on {new_file}')
3030

3131
else:
@@ -40,10 +40,10 @@ def encrypt(file, key):
4040

4141
def decrypt(file, key):
4242
try:
43-
file_content = get_file_content(file)
43+
file_content = file_utils.get_file_content(file)
4444

4545
if file_content:
46-
new_file = store_file_content(caesar_cipher.decrypt(file_content, key), 'decripted.txt')
46+
new_file = file_utils.store_file_content(caesar_cipher.decrypt(file_content, key), 'decripted.txt')
4747
print(f'Content stored on {new_file}')
4848

4949
else:

0 commit comments

Comments
 (0)