changeset 97c81501ee16 in trypod:default
details: https://hg.tryton.org/trypod?cmd=changeset;node=97c81501ee16
description:
Update to Python3
diffstat:
trypod.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r f7ccd068dd3c -r 97c81501ee16 trypod.py
--- a/trypod.py Sun Sep 27 17:07:30 2020 +0200
+++ b/trypod.py Sun Oct 18 14:59:36 2020 +0200
@@ -1,10 +1,10 @@
import hashlib
-import httplib
+import http.client
import os
import json
-from ConfigParser import (SafeConfigParser, NoSectionError,
+from configparser import (SafeConfigParser, NoSectionError,
DuplicateSectionError)
-from urlparse import urlparse, urlunparse
+from urllib.parse import urlparse, urlunparse
from flask import (Flask, jsonify, abort, Response, request, render_template,
redirect)
@@ -188,7 +188,7 @@
send_failure(payload)
# TODO: killed, error, blocked, declined
# TODO: pull_request, tag, deployment
- return Response('', status=httplib.NO_CONTENT)
+ return Response('', status=http.client.NO_CONTENT)
@app.route('/notify/<token>', methods=['POST'])
@@ -257,7 +257,7 @@
config.set('trypod', 'strip', str(app.config['STRIP']))
with open(hgrc, 'w') as fp:
config.write(fp)
- return Response('', httplib.NO_CONTENT)
+ return Response('', http.client.NO_CONTENT)
@app.route('/repo/<name>/deactivate/<token>', methods=['POST'])
@@ -275,7 +275,7 @@
config.remove_section('trypod')
with open(hgrc, 'w') as fp:
config.write(fp)
- return Response('', httplib.NO_CONTENT)
+ return Response('', http.client.NO_CONTENT)
def send_success(payload):