Skip to content

Commit 4c35daf

Browse files
committed
Update primenet.py for missing BEGIN_ASSIGNMENTS_BLOCK
1 parent f5fad46 commit 4c35daf

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tools/primenet.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,15 @@ def fetch(what):
7474
# print(res)
7575

7676
BEGIN_MARK = "<!--BEGIN_ASSIGNMENTS_BLOCK-->"
77-
begin = res.find("<!--BEGIN_ASSIGNMENTS_BLOCK-->")
78-
if begin == -1: raise(AssertionError("assignment no BEGIN mark"))
79-
begin += len(BEGIN_MARK)
80-
end = res.find("<!--END_ASSIGNMENTS_BLOCK-->", begin)
77+
# begin = res.find(BEGIN_MARK)
78+
begin = res.find(">PRP=")
79+
if begin == -1: begin = res.find(">LL=")
80+
if begin == -1:
81+
print(res)
82+
raise(AssertionError("assignment no BEGIN mark"))
83+
begin += 1
84+
# begin += len(BEGIN_MARK)
85+
end = res.find("</", begin)
8186
if end == -1: raise(AssertionError("assignemnt no END mark"))
8287
line = res[begin:end].strip().strip('\n')
8388
print(datetime.now(), " New assignment: ", line)

0 commit comments

Comments
 (0)