Skip to content

Commit 04f1bee

Browse files
committed
Extra logging
1 parent 1bebd71 commit 04f1bee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dockerLaTeX/LaTeXApi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44

55
app = Flask(__name__)
66

7-
allowedCommands = set(['docbook2html','docbook2rtf','dblatex','pandoc'])
87

98
@app.route('/latexApi', methods=['POST'])
109
def index():
10+
allowedCommands = set(['docbook2html','docbook2rtf','dblatex','pandoc'])
1111
try:
1212
dockBookCmd = request.values.get('docBookCmd')
1313
if not docBookCmd:
14+
print("No DocBook command")
1415
abort(400)
16+
cmd = docBookCmd.split(' ')[0]
1517
if (docBookCmd.split(' ')[0] not in allowedCommands):
18+
print(cmd + " is not allowed.")
1619
abort(400)
1720
os.system(dockBookCmd)
1821
return "Success"

0 commit comments

Comments
 (0)