Minor changes
This commit is contained in:
parent
400b4f9bf2
commit
9e17a41e89
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue