Skip to content

Commit

Permalink
FIX: write status messages to sys.stderr
Browse files Browse the repository at this point in the history
writing only the rendered output to stdout allows piping to files / pbpaste
with minimal editing
  • Loading branch information
minrk committed Mar 5, 2021
1 parent 5f8a4fc commit b9739c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion github_activity/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def _cache_data(query_data, path_cache):
path_cache = DEFAULT_PATH_CACHE
path_cache = Path(path_cache)
if not path_cache.exists():
print(f"Creating a new cache at {path_cache}")
print(f"Creating a new cache at {path_cache}", file=sys.stderr)
path_cache.mkdir()

for (org, repo), idata in query_data.groupby(["org", "repo"]):
Expand Down
2 changes: 1 addition & 1 deletion github_activity/github_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get_activity(
search_query += f" type:{kind}"

# Query for both opened and closed issues/PRs in this window
print(f"Running search query:\n{search_query}\n\n")
print(f"Running search query:\n{search_query}\n\n", file=sys.stderr)
query_data = []
for activity_type in ["created", "closed"]:
ii_search_query = (
Expand Down

0 comments on commit b9739c0

Please sign in to comment.