Fix pep8 reports
Zero findings after this commit. We should try to keep that level. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
062e919295
commit
6bc8e08459
@ -20,6 +20,7 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
|
from .__version__ import __version__
|
||||||
|
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) Siemens AG, 2017'
|
__copyright__ = 'Copyright (c) Siemens AG, 2017'
|
||||||
from .__version__ import __version__
|
|
||||||
|
@ -199,8 +199,8 @@ class ConfigStatic(Config):
|
|||||||
(rc, output) = run_cmd(['/usr/bin/git',
|
(rc, output) = run_cmd(['/usr/bin/git',
|
||||||
'rev-parse',
|
'rev-parse',
|
||||||
'--show-toplevel'],
|
'--show-toplevel'],
|
||||||
cwd=os.path.dirname(self.filename),
|
cwd=os.path.dirname(self.filename),
|
||||||
env=self.environ)
|
env=self.environ)
|
||||||
url = output.strip()
|
url = output.strip()
|
||||||
r = Repo(url=url,
|
r = Repo(url=url,
|
||||||
path=url,
|
path=url,
|
||||||
@ -260,7 +260,7 @@ class ConfigJson(ConfigStatic):
|
|||||||
try:
|
try:
|
||||||
with open(self.filename, 'r') as f:
|
with open(self.filename, 'r') as f:
|
||||||
self._config = json.load(f)
|
self._config = json.load(f)
|
||||||
except json.decoder.JSONDecodeError as msg:
|
except json.decoder.JSONDecodeError as msg:
|
||||||
logging.error('Could not load JSON config: {}'.format(msg))
|
logging.error('Could not load JSON config: {}'.format(msg))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
self.setup_environ()
|
self.setup_environ()
|
||||||
|
@ -170,7 +170,8 @@ class ReposFetch(Command):
|
|||||||
os.makedirs(os.path.dirname(repo.path), exist_ok=True)
|
os.makedirs(os.path.dirname(repo.path), exist_ok=True)
|
||||||
gitsrcdir = os.path.join(config.get_repo_ref_dir() or '',
|
gitsrcdir = os.path.join(config.get_repo_ref_dir() or '',
|
||||||
repo.qualified_name)
|
repo.qualified_name)
|
||||||
logging.debug('Looking for repo ref dir in {}'.format(gitsrcdir))
|
logging.debug('Looking for repo ref dir in {}'.
|
||||||
|
format(gitsrcdir))
|
||||||
if config.get_repo_ref_dir() and os.path.exists(gitsrcdir):
|
if config.get_repo_ref_dir() and os.path.exists(gitsrcdir):
|
||||||
run_cmd(['/usr/bin/git',
|
run_cmd(['/usr/bin/git',
|
||||||
'clone',
|
'clone',
|
||||||
@ -179,7 +180,8 @@ class ReposFetch(Command):
|
|||||||
env=config.environ,
|
env=config.environ,
|
||||||
cwd=config.kas_work_dir)
|
cwd=config.kas_work_dir)
|
||||||
else:
|
else:
|
||||||
run_cmd(['/usr/bin/git', 'clone', '-q', repo.url, repo.path],
|
run_cmd(['/usr/bin/git', 'clone', '-q', repo.url,
|
||||||
|
repo.path],
|
||||||
env=config.environ,
|
env=config.environ,
|
||||||
cwd=config.kas_work_dir)
|
cwd=config.kas_work_dir)
|
||||||
continue
|
continue
|
||||||
|
@ -62,6 +62,7 @@ def _read_stream(stream, cb):
|
|||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def _stream_subprocess(cmd, cwd, env, shell, stdout_cb, stderr_cb):
|
def _stream_subprocess(cmd, cwd, env, shell, stdout_cb, stderr_cb):
|
||||||
if shell:
|
if shell:
|
||||||
|
Loading…
Reference in New Issue
Block a user