Commit 67e76d77 authored by Alain Takoudjou's avatar Alain Takoudjou

monitor: fix check of valid monitor URL

parent b6ba7fd2
......@@ -120,7 +120,7 @@ context =
[monitor2-bin]
<= monitor-template-script
filename = monitor.py
md5sum = 927501a8c4ce8dcc39d55af1efdc66ed
md5sum = 222365a469f8ab08a0367d81c0b03982
[run-promise-py]
recipe = slapos.recipe.template:jinja2
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
......@@ -220,7 +221,7 @@ class Monitoring(object):
def getMonitorTitleFromUrl(self, monitor_url):
# This file should be generated
if not monitor_url.startswith('https://') or not monitor_url.startswith('http://'):
if not monitor_url.startswith('https://') and not monitor_url.startswith('http://'):
return 'Unknow Instance'
if not monitor_url.endswith('/'):
monitor_url = monitor_url + '/'
......
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