Minor fixes
This commit is contained in:
parent
d94895c6d7
commit
b80d2851d6
|
@ -27,7 +27,7 @@ def call_php(courseid: int, categoryid: int, timestamp: int):
|
|||
|
||||
|
||||
for mbz in source.glob("course_*_*_*.mbz"):
|
||||
meta = mbzre.search(mbz).groupdict()
|
||||
meta = mbzre.search(str(mbz)).groupdict()
|
||||
|
||||
if not meta["courseid"] in courses.keys():
|
||||
courses[int(meta["courseid"])] = list()
|
||||
|
@ -42,7 +42,7 @@ for course, data in sorted(courses.items(), key = lambda x: x[0]):
|
|||
|
||||
if byage[0][1] > current:
|
||||
if not call_php(course, byage[0][0], byage[0][1]):
|
||||
print("Something went wrong while importing {course}.")
|
||||
print(f"Something went wrong while importing {course}.")
|
||||
continue
|
||||
|
||||
config["STATUS"][str(course)] = str(byage[0][1])
|
||||
|
@ -51,4 +51,5 @@ for course, data in sorted(courses.items(), key = lambda x: x[0]):
|
|||
shutil.move(source / f"course_{course}_{categoryid}_{timestamp}.mbz", completed)
|
||||
|
||||
with open("config.ini", "w") as configfile:
|
||||
config.write(configfile)
|
||||
config.write(configfile)
|
||||
|
Loading…
Reference in a new issue