Skip to content

Commit

Permalink
Add some more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhwaniartefact committed Jun 21, 2024
1 parent 9975504 commit dfd23c1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/fixity.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docs/fixity.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ running; see the section on _ENVIRONMENT VARIABLES_ for information.
* `--debug`:
Print extra debugging output.

* `--timestamps`:
It adds a timestamp to the beginning of each line of output.

## COMMANDS

* `scan <UUID>`:
Expand Down
2 changes: 1 addition & 1 deletion fixity/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ def format_timestamp(t):

def pyprint(message, **kwargs):
if kwargs.get("timestamps"):
message = f"{[format_timestamp(utcnow())]} {message}"
message = f"[{format_timestamp(utcnow())}] {message}"
print(message, file=kwargs.get("file", sys.stderr))
2 changes: 1 addition & 1 deletion tests/test_fixity.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_scan_if_timestamps_is_True(_get, utcnow, mock_check_fixity, capsys):
assert captured.out == ""
assert (
captured.err.strip()
== f"['2018-01-01 03:00:00 UTC'] Fixity scan succeeded for AIP: {aip_id}"
== f"[2018-01-01 03:00:00 UTC] Fixity scan succeeded for AIP: {aip_id}"
)
assert _get.mock_calls == [
mock.call(
Expand Down

0 comments on commit dfd23c1

Please sign in to comment.