diff options
Diffstat (limited to 'lava_scheduler_app/views.py')
-rw-r--r-- | lava_scheduler_app/views.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/lava_scheduler_app/views.py b/lava_scheduler_app/views.py index 3e31bac8c..8b3beff5b 100644 --- a/lava_scheduler_app/views.py +++ b/lava_scheduler_app/views.py @@ -107,13 +107,6 @@ from lava_scheduler_app.tables import ( RunningTable, ) -if sys.version_info[0] == 2: - # Python 2.x - from urllib2 import urlopen -elif sys.version_info[0] == 3: - # For Python 3.0 and later - from urllib.request import urlopen - # pylint: disable=too-many-attributes,too-many-ancestors,too-many-arguments,too-many-locals # pylint: disable=too-many-statements,too-many-branches,too-many-return-statements # pylint: disable=no-self-use,too-many-nested-blocks,too-few-public-methods @@ -1803,23 +1796,6 @@ def job_annotate_failure(request, pk): request=request)) -@post_only -def get_remote_definition(request): - """Fetches remote job definition file.""" - url = request.POST.get("url") - - try: - data = urlopen(url).read() - # Validate that the data at the location is really JSON or YAML. - # This is security based check so noone can misuse this url. - yaml.load(data) - except Exception as e: - return HttpResponse(simplejson.dumps(str(e)), - content_type="application/json") - - return HttpResponse(data) - - class RecentJobsView(JobTableView): def __init__(self, request, device, **kwargs): |