Changeset View
Changeset View
Standalone View
Standalone View
wallace/module_signature.py
Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | if sig_html_conf and sig_text_conf: | ||||
signature_html = open(_sig_html_conf, 'r').read() | signature_html = open(_sig_html_conf, 'r').read() | ||||
if os.path.exists(_sig_text_conf): | if os.path.exists(_sig_text_conf): | ||||
signature_text = open(_sig_text_conf, 'r').read() | signature_text = open(_sig_text_conf, 'r').read() | ||||
if not signature_html and not signature_text and signature_rules is not None: | if not signature_html and not signature_text and signature_rules is not None: | ||||
for signature_rule in signature_rules: | for signature_rule in signature_rules: | ||||
try: | try: | ||||
for attr, regex in signature_rule.iteritems(): | for attr, regex in signature_rule.items(): | ||||
if attr == "html": | if attr == "html": | ||||
if not os.path.exists(signature_rule['html']): | if not os.path.exists(signature_rule['html']): | ||||
raise ValueError | raise ValueError | ||||
continue | continue | ||||
if attr == "text": | if attr == "text": | ||||
if not os.path.exists(signature_rule['text']): | if not os.path.exists(signature_rule['text']): | ||||
raise ValueError | raise ValueError | ||||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |