Merge pull request #2346 from itssimon/master

Change os.errno to errno for py3.7 compatibility
This commit is contained in:
Joffrey F 2019-05-18 19:34:36 -07:00 committed by GitHub
commit c2ceb89329
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
import errno
import json
import os
import subprocess
import six
@ -84,7 +84,7 @@ class Store(object):
[self.exe, subcmd], stdin=subprocess.PIPE,
stdout=subprocess.PIPE, env=env,
)
output, err = process.communicate(data_input)
output, _ = process.communicate(data_input)
if process.returncode != 0:
raise subprocess.CalledProcessError(
returncode=process.returncode, cmd='', output=output
@ -92,7 +92,7 @@ class Store(object):
except subprocess.CalledProcessError as e:
raise errors.process_store_error(e, self.program)
except OSError as e:
if e.errno == os.errno.ENOENT:
if e.errno == errno.ENOENT:
raise errors.StoreError(
'{} not installed or not available in PATH'.format(
self.program