Minor changes

This commit is contained in:
Vega 2024-02-14 21:37:37 +00:00
parent 400b4f9bf2
commit 9e17a41e89
Signed by: muteplayer
GPG Key ID: 31FE0B16CB1045E7
1 changed files with 8 additions and 4 deletions

View File

@ -1,15 +1,19 @@
from sys import argv,exit as exitc
from sys import argv, exit as exitc
if len(argv) != 2:
if len(argv) > 2:
print('Please inform just one file!')
exitc(1)
exitc(2)
elif len(argv) != 2:
print('Plase inform a file!')
exitc(3)
try:
file = open(argv[1], 'rb')
except FileNotFoundError:
print('The specified file was not found!')
exitc(2)
exitc(4)
content = file.read()
file.close()