mirror of
https://github.com/fastogt/pyfastogt
synced 2025-03-09 23:38:55 +00:00
review
This commit is contained in:
parent
96fa274aa7
commit
b4f0649a08
2 changed files with 11 additions and 8 deletions
|
@ -2,13 +2,16 @@
|
|||
|
||||
import os
|
||||
|
||||
|
||||
class BuildError(Exception):
|
||||
def __init__(self, value):
|
||||
self.value_ = value
|
||||
|
||||
def __str__(self):
|
||||
return self.value_
|
||||
|
||||
def read_file_line_by_line(file):
|
||||
|
||||
def read_file_line_by_line(file) -> list:
|
||||
if not os.path.exists(file):
|
||||
raise BuildError('file path: %s not exists' % file)
|
||||
|
||||
|
@ -17,4 +20,4 @@ def read_file_line_by_line(file):
|
|||
for line in ins:
|
||||
file_array.append(line.strip())
|
||||
|
||||
return file_array
|
||||
return file_array
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue