Commit 0cc4ef92 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Lint the code

parent c0173efa
......@@ -2,8 +2,8 @@ from django.conf.urls import url
from . import views
url(r'^state/', views.StateView.as_view()),
url(r'^sshkey/', views.SSHPublicKeyView.as_view()),
url(r'^deployments/', views.DeploymentView.as_view()),
url(r'^delete_user/', views.UserDeletionView.as_view()),
url(r'^state', views.StateView.as_view()),
url(r'^sshkey', views.SSHPublicKeyView.as_view()),
url(r'^deployments', views.DeploymentView.as_view()),
url(r'^delete_user', views.UserDeletionView.as_view()),
......@@ -3,15 +3,17 @@
import json
import logging
import pika
from pika.exceptions import ConnectionClosed
from requests.auth import HTTPBasicAuth
from django.contrib.auth.models import AbstractUser, Group
from django.core.cache import cache
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django_mysql.models import JSONField
from pika.exceptions import ConnectionClosed
import pika
from requests.auth import HTTPBasicAuth
from .auth.v1.models import OIDCConfig
LOGGER = logging.getLogger(__name__)
......@@ -149,7 +151,6 @@ class RabbitMQInstance(SingletonModel):
def publish_by_service(self, service, msg):
......@@ -219,7 +220,7 @@ class User(AbstractUser):
# if the user does not exists
def get_user(cls, userinfo, idp):
if not 'sub' in userinfo:
if 'sub' not in userinfo:
raise Exception('get_user needs a userinfo which contains the users subject')
query_result = cls.objects.filter(
......@@ -705,7 +706,7 @@ class DeploymentTask(models.Model):
return '[DeploymentTask:{}] {}'.format(self, msg)
def publish(self):
# FIXME mitigating circular dependencies here
# mitigating circular dependencies here
from .clientapi.serializers import DeploymentTaskSerializer
msg = json.dumps(DeploymentTaskSerializer(self).data)
......@@ -723,7 +724,7 @@ class DeploymentTask(models.Model):
if not self.task_items.exists():
# finished sends its own message
from .frontend.views import user_state_dict
content = {
......@@ -735,7 +736,7 @@ class DeploymentTask(models.Model):
# maintenance after all task items are done
def finished(self):
def _finished(self):'done'))
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