Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def can_run(stix_version, rule_min, rule_max):
if not rule_min:
return True
doc_ver = StrictVersion(remove_version_prefix(stix_version))
min_ver = StrictVersion(remove_version_prefix(rule_min))
if rule_max:
max_ver = StrictVersion(remove_version_prefix(rule_max))
return (min_ver <= doc_ver <= max_ver)
return min_ver <= doc_ver
def can_run(stix_version, rule_min, rule_max):
if not rule_min:
return True
doc_ver = StrictVersion(remove_version_prefix(stix_version))
min_ver = StrictVersion(remove_version_prefix(rule_min))
if rule_max:
max_ver = StrictVersion(remove_version_prefix(rule_max))
return (min_ver <= doc_ver <= max_ver)
return min_ver <= doc_ver
def can_run(stix_version, rule_min, rule_max):
if not rule_min:
return True
doc_ver = StrictVersion(remove_version_prefix(stix_version))
min_ver = StrictVersion(remove_version_prefix(rule_min))
if rule_max:
max_ver = StrictVersion(remove_version_prefix(rule_max))
return (min_ver <= doc_ver <= max_ver)
return min_ver <= doc_ver