Skip to content

Commit 86b37bb

Browse files
committed
Fix blessclient for python3.7
1 parent 46bafe4 commit 86b37bb

File tree

4 files changed

+19
-10
lines changed

4 files changed

+19
-10
lines changed

.gitignore

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
*.pyc
2-
.coverage
3-
.cache
42
.DS_Store
5-
coverage.xml
6-
venv/
7-
blessclient.run
3+
/.coverage
4+
/.pytest_cache
5+
/.tox
6+
blessclient.cfg
87
blessclient.egg-info/
8+
blessclient.run
99
build/
10-
blessclient.cfg
10+
coverage.xml
11+
venv/

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ matrix:
66
python: 3.6
77
- env: TOXENV=py27
88
python: 2.7
9+
# https://github.com/deadsnakes/travis-ci-python3.7-example
10+
- env: TOXENV=py37
11+
sudo: required
12+
dist: xenial
13+
addons:
14+
apt:
15+
sources:
16+
- sourceline: 'deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main'
17+
packages:
18+
- python3.7-dev
919
install: pip install tox
1020
script: tox
1121
cache:

blessclient/bless_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class BlessConfig(object):
88
'user_session_length': '64800',
99
'usebless_role_session_length': '3600',
1010
'update_sshagent': 'true',
11-
'remote_user': None,
11+
'remote_user': '',
1212
'ca_backend': 'bless',
1313
}
1414

blessclient/client.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -756,9 +756,7 @@ def bless(region, nocache, showgui, hostname, bless_config):
756756

757757
my_ip = userIP.getIP()
758758
ip_list = "{},{}".format(my_ip, bless_config.get_aws_config()['bastion_ips'])
759-
remote_user = bless_config.get_aws_config()['remote_user']
760-
if remote_user is None:
761-
remote_user = username
759+
remote_user = bless_config.get_aws_config()['remote_user'] or username
762760
payload = {
763761
'bastion_user': username,
764762
'bastion_user_ip': my_ip,

0 commit comments

Comments
 (0)