diff options
author | cclauss <cclauss@bluewin.ch> | 2018-08-29 16:53:01 +0200 |
---|---|---|
committer | Max Illfelder <illfelder@users.noreply.github.com> | 2018-08-29 07:53:01 -0700 |
commit | 9fd0b5055813944b829b721ef4abcc35fcb70074 (patch) | |
tree | 7100a85662a6c5db1698b78f73fe4bacf23b3f60 | |
parent | 7e6674c7021e6fd768d6c92e51cde1ecb89dd432 (diff) | |
download | google-compute-image-packages-9fd0b5055813944b829b721ef4abcc35fcb70074.tar.gz |
Travis CI: Add Python 3.7 to the testing (#648)
* Travis CI: Add Python 3.7 to the testing
* Add Python 3.7 trove classifier to setup.py
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | google_compute_engine/accounts/oslogin_utils.py | 7 | ||||
-rwxr-xr-x | setup.py | 1 | ||||
-rw-r--r-- | tox.ini | 6 |
4 files changed, 12 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index 83d23bb..fbf57a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,10 @@ python: - 3.5 - 3.6 - pypy +matrix: + include: + - python: 3.7 + dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069) os: - linux install: diff --git a/google_compute_engine/accounts/oslogin_utils.py b/google_compute_engine/accounts/oslogin_utils.py index 1a1d2b6..e8cf520 100644 --- a/google_compute_engine/accounts/oslogin_utils.py +++ b/google_compute_engine/accounts/oslogin_utils.py @@ -15,6 +15,7 @@ """Utilities for provisioning or deprovisioning a Linux user account.""" +import errno import os import subprocess import time @@ -50,7 +51,7 @@ class OsLoginUtils(object): try: return subprocess.call([constants.OSLOGIN_CONTROL_SCRIPT, action]) except OSError as e: - if e.errno == os.errno.ENOENT: + if e.errno == errno.ENOENT: return None else: raise @@ -83,7 +84,7 @@ class OsLoginUtils(object): try: return subprocess.call([constants.OSLOGIN_NSS_CACHE_SCRIPT]) except OSError as e: - if e.errno == os.errno.ENOENT: + if e.errno == errno.ENOENT: return None else: raise @@ -94,7 +95,7 @@ class OsLoginUtils(object): try: os.remove(constants.OSLOGIN_NSS_CACHE) except OSError as e: - if e.errno != os.errno.ENOENT: + if e.errno != errno.ENOENT: raise def UpdateOsLogin(self, enable, duration=NSS_CACHE_DURATION_SEC): @@ -64,6 +64,7 @@ setuptools.setup( 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Topic :: Internet', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: System :: Installation/Setup', @@ -1,9 +1,9 @@ [tox] -envlist = py26,py27,py32,py33,py34,py35,pypy,pypy3 +envlist = py26,py27,py32,py33,py34,py35,py36,py37,pypy,pypy3 [testenv] deps = - py{35,36}: distro + py{35,py36,py37}: distro setuptools>=20 pytest pytest-cov @@ -64,4 +64,4 @@ exclude = # See https://github.com/ryanhiebert/tox-travis#advanced-configuration [travis] python = - 2.7: py27, lint + 3.6: py36, lint |