Skip to content

Commit 3cb5762

Browse files
authored
Merge pull request #35 from britive/develop
v0.6.0
2 parents 288c25c + 3d0004b commit 3cb5762

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

CHANGELOG.md

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

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

5+
## v0.6.0 [2022-11-15]
6+
#### What's New
7+
* None
8+
9+
#### Enhancements
10+
* When checking out a profile, the default is to check out programmatic access unless the `--console/-c` flag is set. This
11+
enhancement will enable auto check out of console access if programmatic access is not available for the specified profile.
12+
13+
#### Bug Fixes
14+
* None
15+
16+
#### Dependencies
17+
* None
18+
19+
#### Other
20+
* None
21+
522
## v0.5.3 [2022-11-01]
623
#### What's New
724
* None

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.5.3
3+
version = 0.6.0
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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,14 @@ def _checkout(self, profile_name, env_name, app_name, programmatic, blocktime, m
318318
raise click.ClickException('approval required and no justification provided.')
319319
except ValueError as e:
320320
raise click.BadParameter(str(e))
321+
except Exception as e:
322+
if 'programmatic access is not enabled' in str(e).lower():
323+
# attempt to automatically checkout console access instead
324+
# this is a cli only feature - not available in the sdk
325+
self.print('no programmatic access available - checking out console access instead')
326+
return self._checkout(profile_name, env_name, app_name, False, blocktime, maxpolltime, justification)
327+
else:
328+
raise e
321329

322330
@staticmethod
323331
def _should_check_force_renew(app, force_renew, console):

0 commit comments

Comments
 (0)