Fix minor code quality issues
This commit is contained in:
parent
8abcf059b0
commit
590bf958de
@ -143,7 +143,8 @@ class LexiconArticle:
|
||||
target = cite_tuple[1]
|
||||
# Create article objects for phantom citations
|
||||
if target not in article_by_title:
|
||||
article_by_title[target] = LexiconArticle(None, sys.maxsize, target, "<p><i>This entry hasn't been written yet.</i></p>", {})
|
||||
article_by_title[target] = LexiconArticle(None, sys.maxsize, target,
|
||||
"<p><i>This entry hasn't been written yet.</i></p>", {})
|
||||
# Interlink citations
|
||||
if article_by_title[target].player is None:
|
||||
article.pcites.add(target)
|
||||
|
@ -51,7 +51,7 @@ def load_config(name):
|
||||
line = f.readline()
|
||||
while line:
|
||||
# Skim lines until a value definition begins
|
||||
conf_match = re.match(">>>([^>]+)>>>\s+", line)
|
||||
conf_match = re.match(r">>>([^>]+)>>>\s+", line)
|
||||
if not conf_match:
|
||||
line = f.readline()
|
||||
continue
|
||||
@ -59,11 +59,11 @@ def load_config(name):
|
||||
conf = conf_match.group(1)
|
||||
conf_value = ""
|
||||
line = f.readline()
|
||||
conf_match = re.match("<<<{0}<<<\s+".format(conf), line)
|
||||
conf_match = re.match(r"<<<{0}<<<\s+".format(conf), line)
|
||||
while line and not conf_match:
|
||||
conf_value += line
|
||||
line = f.readline()
|
||||
conf_match = re.match("<<<{0}<<<\s+".format(conf), line)
|
||||
conf_match = re.match(r"<<<{0}<<<\s+".format(conf), line)
|
||||
if not line:
|
||||
# TODO Not this
|
||||
raise SystemExit("Reached EOF while reading config value {}".format(conf))
|
||||
|
Loading…
Reference in New Issue
Block a user