Commit 9dc4ff72 authored by Mattia Rizzolo's avatar Mattia Rizzolo

flake8

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 59cd8528
......@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import json
import pathlib
import pkg_resources
......@@ -154,8 +153,6 @@ class TestsManager:
if branch not in self.branches:
return
mr = self.branches[branch].mr
# Rebuild the branch from scratch
self.instances.remove_branch(branch)
self.branches[branch].destroy()
......@@ -182,7 +179,8 @@ class TestsManager:
self.branches[branch].deploy()
self.instances.load_branch(self.branches[branch])
self.gitlab.post_comment(obj["id"],
self.gitlab.post_comment(
obj["id"],
"L'istanza live per il branch **%s** è ora "
"[disponibile](%s/%s/)." %
(branch, self.config["base-url"], branch)
......
......@@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import subprocess
import os
import shutil
......@@ -60,8 +59,8 @@ class Branch:
active = False
self.active = active
self.mr = result["id"]
self.mr_url = (self.manager.config["gitlab-url"]+"/"+
self.manager.config["gitlab-project"]+
self.mr_url = (self.manager.config["gitlab-url"]+"/" +
self.manager.config["gitlab-project"] +
"/merge_requests/"+str(self.mr_id))
self.author = result["author"]["username"]
......
......@@ -29,7 +29,7 @@ class GitLabAPI:
def call(self, method, endpoint, params=None, data=None):
"""Make a raw call to the GitLab API"""
if params == None:
if params is not None:
params = {}
if data is None:
data = {}
......
......@@ -19,7 +19,6 @@ import pathlib
import os
import sys
import json
import subprocess
import random
import string
......@@ -107,7 +106,7 @@ def init_command(ctx, git_url):
@cli.command("run")
@click.option("-p", "--port", help="The port for the frontend application",
default=8080)
default=8080)
@click.pass_obj
def run_command(obj, port):
"""Run managetests"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment