mirror of
https://github.com/mtan93/cachet-url-monitor.git
synced 2026-03-08 05:31:58 +00:00
Addressing codacy issues
This commit is contained in:
@@ -294,9 +294,10 @@ class Expectaction(object):
|
||||
|
||||
class HttpStatus(Expectaction):
|
||||
def __init__(self, configuration):
|
||||
self.status_range = self.parse_range(configuration['status_range'])
|
||||
self.status_range = HttpStatus.parse_range(configuration['status_range'])
|
||||
|
||||
def parse_range(self, range_string):
|
||||
@staticmethod
|
||||
def parse_range(range_string):
|
||||
statuses = range_string.split("-")
|
||||
if len(statuses) == 1:
|
||||
# When there was no range given, we should treat the first number as a single status check.
|
||||
|
||||
Reference in New Issue
Block a user