Skip to content

Commit 41bcc87

Browse files
authored
Catch exception for missing GH CLI (#56)
* Update __init__.py * bump isort version in pre-commit
1 parent 6217a3b commit 41bcc87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ repos:
3131
hooks:
3232
- id: pyupgrade
3333
- repo: https://github.com/PyCQA/isort
34-
rev: 5.10.1
34+
rev: 5.12.0
3535
hooks:
3636
- id: isort
3737
- repo: https://github.com/pycqa/flake8

src/iterative_telemetry/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def _generate_github_id():
287287
["gh", "api", f"users/{actor}", "--jq", ".name, .login, .id"],
288288
text=True,
289289
)
290-
except subprocess.SubprocessError:
290+
except (subprocess.SubprocessError, FileNotFoundError):
291291
return None
292292
return group_id, user_id
293293

0 commit comments

Comments
 (0)