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 @@ ...@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import json import json
import pathlib
import pkg_resources import pkg_resources
...@@ -154,8 +153,6 @@ class TestsManager: ...@@ -154,8 +153,6 @@ class TestsManager:
if branch not in self.branches: if branch not in self.branches:
return return
mr = self.branches[branch].mr
# Rebuild the branch from scratch # Rebuild the branch from scratch
self.instances.remove_branch(branch) self.instances.remove_branch(branch)
self.branches[branch].destroy() self.branches[branch].destroy()
...@@ -182,7 +179,8 @@ class TestsManager: ...@@ -182,7 +179,8 @@ class TestsManager:
self.branches[branch].deploy() self.branches[branch].deploy()
self.instances.load_branch(self.branches[branch]) 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 " "L'istanza live per il branch **%s** è ora "
"[disponibile](%s/%s/)." % "[disponibile](%s/%s/)." %
(branch, self.config["base-url"], branch) (branch, self.config["base-url"], branch)
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License # 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/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import subprocess import subprocess
import os import os
import shutil import shutil
...@@ -60,8 +59,8 @@ class Branch: ...@@ -60,8 +59,8 @@ class Branch:
active = False active = False
self.active = active self.active = active
self.mr = result["id"] self.mr = result["id"]
self.mr_url = (self.manager.config["gitlab-url"]+"/"+ self.mr_url = (self.manager.config["gitlab-url"]+"/" +
self.manager.config["gitlab-project"]+ self.manager.config["gitlab-project"] +
"/merge_requests/"+str(self.mr_id)) "/merge_requests/"+str(self.mr_id))
self.author = result["author"]["username"] self.author = result["author"]["username"]
......
...@@ -29,7 +29,7 @@ class GitLabAPI: ...@@ -29,7 +29,7 @@ class GitLabAPI:
def call(self, method, endpoint, params=None, data=None): def call(self, method, endpoint, params=None, data=None):
"""Make a raw call to the GitLab API""" """Make a raw call to the GitLab API"""
if params == None: if params is not None:
params = {} params = {}
if data is None: if data is None:
data = {} data = {}
......
...@@ -19,7 +19,6 @@ import pathlib ...@@ -19,7 +19,6 @@ import pathlib
import os import os
import sys import sys
import json import json
import subprocess
import random import random
import string import string
......
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