Skip to content

Commit 64bc22f

Browse files
helgimboersma
authored andcommitted
ref(models): remove docker.utils from app model as it is not needed
1 parent e60b492 commit 64bc22f

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

rootfs/api/models/app.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import time
66
from threading import Thread
77
import requests
8-
from docker.utils import utils as dockerutils
98

109
# Django
1110
from django.core.exceptions import ValidationError
@@ -504,17 +503,7 @@ def run(self, user, command):
504503
release=self.release_set.latest(),
505504
type='run',
506505
num=c_num)
507-
image = c.release.image
508506

509-
# check for backwards compatibility
510-
def _has_hostname(image):
511-
repo, tag = dockerutils.parse_repository_tag(image)
512-
return True if '/' in repo and '.' in repo.split('/')[0] else False
513-
514-
if not _has_hostname(image):
515-
image = '{}:{}/{}'.format(settings.REGISTRY_HOST,
516-
settings.REGISTRY_PORT,
517-
image)
518507
# SECURITY: shell-escape user input
519508
escaped_command = command.replace("'", "'\\''")
520509
return c.run(escaped_command)

0 commit comments

Comments
 (0)