Skip to content

Commit a76577b

Browse files
authored
Merge pull request #24 from britive/file-lock
ls profiles checked out fix
2 parents 5b7d847 + fc172ee commit a76577b

File tree

5 files changed

+25
-6
lines changed

5 files changed

+25
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ __pycache__/
99
testing-variables.txt
1010
.DS_Store
1111
site/
12+
lock-test.py
1213

1314
# C extensions
1415
*.so

CHANGELOG.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,23 @@
22

33
All changes to the package starting with v0.3.1 will be logged here.
44

5+
## v0.4.1 [2022-09-30]
6+
#### What's New
7+
* None
8+
9+
#### Enhancements
10+
* None
11+
12+
#### Bug Fixes
13+
* Fix and issue with `pybritive ls profile --checked-out` where all environments for the checked out profile were being returned instead of just the actual environments checked out.
514

6-
## v0.4.0 [2022-09-XX]
15+
#### Dependencies
16+
* `britive~=2.9.0` from `britive~=2.8.0`
17+
18+
#### Other
19+
* None
20+
21+
## v0.4.0 [2022-09-16]
722
#### What's New
823
* `pybritive-aws-cred-process` - a "side-car" helper script/CLI program that provides a minimal codebase in an effort to reduce the latency of obtaining credentials via the AWS `credential_process` command.
924

@@ -25,7 +40,7 @@ region=us-east-1
2540

2641
However, the former reduces the latency of the call by ~50% while still maintaining basic functionality.
2742

28-
### Enhancements
43+
#### Enhancements
2944
* Provided a `GenericCloudCredentialPrinter` class which handles printing all cloud credentials not covered by a cloud specific credential printer.
3045

3146
#### Bug Fixes

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
britive~=2.8.0
1+
britive~=2.9.0
22
certifi==2022.6.15
33
charset-normalizer==2.1.0
44
click==8.1.3

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = pybritive
3-
version = 0.4.0
3+
version = 0.4.1
44
author = Britive Inc.
55
author_email = support@britive.com
66
description = A pure Python CLI for Britive

src/pybritive/britive_cli.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,13 @@ def list_profiles(self, checked_out: bool = False):
153153
self.login()
154154
self._set_available_profiles()
155155
data = []
156-
checked_out_profiles = [p['papId'] for p in self.b.my_access.list_checked_out_profiles()] if checked_out else []
156+
checked_out_profiles = [
157+
f'{p["papId"]}-{p["environmentId"]}'
158+
for p in self.b.my_access.list_checked_out_profiles()
159+
] if checked_out else []
157160

158161
for profile in self.available_profiles:
159-
if not checked_out or profile['profile_id'] in checked_out_profiles:
162+
if not checked_out or f'{profile["profile_id"]}-{profile["env_id"]}' in checked_out_profiles:
160163
row = {
161164
'Application': profile['app_name'],
162165
'Environment': profile['env_name'],

0 commit comments

Comments
 (0)