Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-api-cluster
Commits
e25b55f6
Commit
e25b55f6
authored
Aug 01, 2021
by
Wei Shoulin
Browse files
level1 file
parent
b903c339
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_dfs_api_cluster/ifs/level1.py
View file @
e25b55f6
...
...
@@ -170,8 +170,12 @@ class Level1DataApi(object):
yield
level1_pb2
.
WriteLevel1Req
(
record
=
rec
,
data
=
data
)
try
:
if
not
rec
.
file_path
:
return
Result
.
error
(
message
=
"file_path is blank"
)
if
not
os
.
path
.
exists
(
rec
.
file_path
):
return
Result
.
error
(
message
=
"the file [%s] not existed"
%
(
rec
.
file_path
,
))
if
not
rec
.
filename
:
rec
.
filename
=
os
.
path
.
basename
(
rec
.
file_path
)
resp
,
_
=
self
.
stub
.
Write
.
with_call
(
stream
(
rec
),
metadata
=
get_auth_headers
())
if
resp
.
success
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment