From 4df001601607a25332a7bf4a9729bcc0fe4cf9c5 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 29 Jul 2018 14:32:09 +0300 Subject: Change: use pre-defined OUT and ERR functions --- pipelines/debian.ick | 26 ++------------------------ pipelines/get_sources.ick | 5 +---- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/pipelines/debian.ick b/pipelines/debian.ick index 1f8e5c5..f09c082 100644 --- a/pipelines/debian.ick +++ b/pipelines/debian.ick @@ -65,21 +65,7 @@ pipelines: - sources actions: - python: | - import os, subprocess - - def RUN(*args, **kwargs): - print('Executing:', args, kwargs) - if 'check' not in kwargs: - kwargs['check'] = True - return subprocess.run(args, **kwargs) - - def OUT(*args, **kwargs): - x = RUN(*args, stdout=subprocess.PIPE, **kwargs) - return x.stdout.decode('UTF-8') - - def ERR(*args, **kwargs): - x = RUN(*args, stderr=subprocess.PIPE, check=False, **kwargs) - return x.stderr.decode('UTF-8') + import os def is_package_name(s): ok = "abcdefghijklmnopqrstyuvwxyz" @@ -121,15 +107,7 @@ pipelines: - distribution actions: - python: | - import os, subprocess - - def RUN(*args, **kwargs): - print('Executing:', args, kwargs) - return subprocess.run(args, check=True, **kwargs) - - def OUT(*args, **kwargs): - x = RUN(*args, stdout=subprocess.PIPE, **kwargs) - return x.stdout.decode('UTF-8') + import os sources = params['sources'] distribution = params['distribution'] diff --git a/pipelines/get_sources.ick b/pipelines/get_sources.ick index 7c061a6..7d68c81 100644 --- a/pipelines/get_sources.ick +++ b/pipelines/get_sources.ick @@ -45,10 +45,7 @@ pipelines: where: host - python: | - import os, re, subprocess - def RUN(*args, cwd=None): - print('Executing:', args, 'cwd:', cwd) - subprocess.check_call(args, cwd=cwd) + import os, re sources = params['sources'] for source in sources: name = source['name'] -- cgit v1.2.1