Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
cloudooo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
cloudooo
Commits
971e3328
Commit
971e3328
authored
Feb 11, 2016
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
Show 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):
...
@@ -127,14 +127,18 @@ class Handler(object):
env
=
self
.
environment
,
env
=
self
.
environment
,
stdout
=
PIPE
,
stdout
=
PIPE
,
stderr
=
PIPE
,
stderr
=
PIPE
,
close_fds
=
True
,
)
)
# stdout, stderr = p.communicate()
stdout
,
stderr
=
p
.
communicate
()
ret
=
p
.
wait
()
file_content
=
open
(
output_file
.
name
).
read
()
# logger.debug(stdout)
return_code_msg
=
"yformat convert x2t return:{}"
.
format
(
p
.
returncode
)
# logger.debug(stderr)
if
p
.
returncode
!=
0
or
not
file_content
:
logger
.
debug
(
"yformat convert x2t return:{}"
.
format
(
ret
))
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
()
self
.
file
.
trash
()
return
open
(
output_file
.
name
).
read
()
return
file_content
def
getMetadata
(
self
,
base_document
=
False
):
def
getMetadata
(
self
,
base_document
=
False
):
"""Returns a dictionary with all metadata of document.
"""Returns a dictionary with all metadata of document.
...
...
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