mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 10:10:59 +00:00
condense debug prints
This commit is contained in:
@@ -605,18 +605,20 @@ class LoadingSurvex:
|
||||
print(message, file=sys.stderr)
|
||||
stash_data_issue(parser="survex", message=message)
|
||||
|
||||
n = 0
|
||||
for sb in chunk:
|
||||
got_obj, created = SurvexBlock.objects.get_or_create(
|
||||
_blockid=sb._blockid,
|
||||
)
|
||||
if created:
|
||||
print(f" - {sb} Created", file=sys.stderr)
|
||||
n += 1
|
||||
#print(f" - {sb} Created", file=sys.stderr)
|
||||
else:
|
||||
# update the block if it changed
|
||||
got_obj._blockid = sb._blockid
|
||||
got_obj.save()
|
||||
# print(f" - {sb} SAVED", file=sys.stderr)
|
||||
print(f" - {len(chunk)} SBs saved to db", file=sys.stderr)
|
||||
print(f" - {len(chunk)} SBs saved to db, {n} created", file=sys.stderr)
|
||||
|
||||
|
||||
print(" - Success: Entire tree of survexblocks saved to db.", file=sys.stderr)
|
||||
|
||||
Reference in New Issue
Block a user