0004-seo-debug-manage-null-variable-32147.patch
hobo/seo/views.py | ||
---|---|---|
23 | 23 |
from .forms import RobotsTxtForm, SettingsForm |
24 | 24 | |
25 | 25 |
ALLOW = "" |
26 | 26 |
DISALLOW = """User-agent: * |
27 | 27 |
Disallow: /""" |
28 | 28 | |
29 | 29 | |
30 | 30 |
def get_mode(content): |
31 |
if content == None: |
|
32 |
return 'allow' |
|
31 | 33 |
content = content.strip().replace('\r', '') |
32 | 34 |
if content == ALLOW: |
33 | 35 |
return 'allow' |
34 | 36 |
if content == DISALLOW: |
35 | 37 |
return 'disallow' |
36 | 38 |
return 'customize' |
37 | 39 | |
38 | 40 | |
39 |
- |