Skip to content

Commit

Permalink
fixed lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
godfryd committed Jul 8, 2021
1 parent 4a45c72 commit 2c2d9b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions agent/kraken/agent/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ def prepare_dest_dir(version):

def make_links_to_new_binaries(dest_dir):
if os.path.exists('/opt/kraken/kkagent'):
subprocess.run('sudo rm -f /opt/kraken/kkagent', shell=True)
subprocess.run('sudo rm -f /opt/kraken/kkagent', shell=True, check=True)
cmd = 'sudo ln -s %s/kkagent /opt/kraken/kkagent' % dest_dir
subprocess.run(cmd, shell=True, check=True)

if os.path.exists('/opt/kraken/kktool'):
subprocess.run('sudo rm -f /opt/kraken/kktool', shell=True)
subprocess.run('sudo rm -f /opt/kraken/kktool', shell=True, check=True)
cmd = 'sudo ln -s %s/kktool /opt/kraken/kktool' % dest_dir
subprocess.run(cmd, shell=True, check=True)

Expand Down
7 changes: 2 additions & 5 deletions server/tests/test_watchdog.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import logging
import datetime

import pytest

import sqlalchemy
from flask import Flask

from kraken.server import consts, utils, initdb
from kraken.server.models import db, Run, Job, TestCaseResult, Branch, Flow, Stage, Project, Issue, System, AgentsGroup, TestCase, Tool, AgentAssignment, Agent
from kraken.server.bg import jobs
from kraken.server.models import db, Run, Job, Branch, Flow, Stage, Project, Issue, System, AgentsGroup, TestCase, Tool, AgentAssignment, Agent

from dbtest import prepare_db

Expand Down Expand Up @@ -67,7 +64,7 @@ def test__check_agents_to_destroy():
# simple case but still empty
a = Agent(name='agent', address='1.2.3.4')
ag = AgentsGroup(name='group')
aa = AgentAssignment(agent=a, agents_group=ag)
AgentAssignment(agent=a, agents_group=ag)
db.session.commit()

all_count, outdated_count, dangling_count = watchdog._check_agents_to_destroy()
Expand Down

0 comments on commit 2c2d9b8

Please sign in to comment.