Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cloudooo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
cloudooo
Commits
971e3328
Commit
971e3328
authored
9 years ago
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
yformat: raise on empty outputfile and returncode != 0
parent
fc6e4976
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
cloudooo/handler/yformat/handler.py
cloudooo/handler/yformat/handler.py
+10
-6
No files found.
cloudooo/handler/yformat/handler.py
View file @
971e3328
...
...
@@ -127,14 +127,18 @@ class Handler(object):
env
=
self
.
environment
,
stdout
=
PIPE
,
stderr
=
PIPE
,
close_fds
=
True
,
)
# stdout, stderr = p.communicate()
ret
=
p
.
wait
()
# logger.debug(stdout)
# logger.debug(stderr)
logger
.
debug
(
"yformat convert x2t return:{}"
.
format
(
ret
))
stdout
,
stderr
=
p
.
communicate
()
file_content
=
open
(
output_file
.
name
).
read
()
return_code_msg
=
"yformat convert x2t return:{}"
.
format
(
p
.
returncode
)
if
p
.
returncode
!=
0
or
not
file_content
:
raise
Exception
(
return_code_msg
+
'
\
n
'
+
stderr
)
logger
.
debug
(
stdout
)
logger
.
debug
(
stderr
)
logger
.
debug
(
"yformat convert x2t return:{}"
.
format
(
p
.
returncode
))
self
.
file
.
trash
()
return
open
(
output_file
.
name
).
read
()
return
file_content
def
getMetadata
(
self
,
base_document
=
False
):
"""Returns a dictionary with all metadata of document.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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