Skip to content

Commit

Permalink
Add suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhwaniartefact committed Jun 13, 2024
1 parent c72fb8f commit 296a796
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion fixity/fixity.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ def scanall(
success = False
except Exception as e:
utils.pyprint(
f"Internal error encountered while scanning AIP {aip['uuid']} ({type(e).__name__})"
f"Internal error encountered while scanning AIP {aip['uuid']} ({type(e).__name__})",
file=sys.stdout,
)
if throttle_time:
sleep(throttle_time)
Expand Down
7 changes: 2 additions & 5 deletions fixity/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,5 @@ def utcnow():
return datetime.now(timezone.utc)


def pyprint(message):
if message.startswith("Internal error encountered"):
print(message, file=sys.stdout)
else:
print(message, file=sys.stderr)
def pyprint(message, **kwargs):
print(message, file=kwargs.get("file", sys.stderr))

0 comments on commit 296a796

Please sign in to comment.