Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix py errors #7620

Closed
wants to merge 2 commits into from
Closed

Fix py errors #7620

wants to merge 2 commits into from

Conversation

thefourtheye
Copy link
Contributor

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

tools

Description of change

There are two fixes.

  1. The RunProcess function returns four values, but it is unpacked over
    three variables and this will fail at runtime. This patch unpacks the
    fourth value on a dummy variable. - tools/test.py
  2. The format specifier is incomplete and without this the program will
    fail at runtime, with "incomplete format" error. - tools/icu/shrink-icu-src.py

cc @bnoordhuis @addaleax @jasnell

@thefourtheye thefourtheye added the tools Issues and PRs related to the tools directory. label Jul 8, 2016
@@ -697,7 +697,7 @@ def Execute(args, context, timeout=None, env={}, faketty=False):


def ExecuteNoCapture(args, context, timeout=None):
(process, exit_code, timed_out) = RunProcess(
(process, exit_code, timed_out, _) = RunProcess(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is basically dead code. I'd be alright with removing it and the code path leading up to it (the if not options.no_build: statement in Main().)

@addaleax
Copy link
Member

addaleax commented Jul 8, 2016

LGTM with CI and with or without @bnoordhuis’ suggestion

As the `no-build` and `build-only` options are not used anymore, they
can be safely removed.
The format specifier is incomplete and without this the program will
fail at runtime, with "incomplete format" error.
@thefourtheye
Copy link
Contributor Author

@bnoordhuis I removed the no-build and build-only options. I think we don't use them. PTAL.

@bnoordhuis
Copy link
Member

LGTM

@thefourtheye
Copy link
Contributor Author

Landed in ef1f766 and 780776c

@thefourtheye thefourtheye deleted the fix-py-errors branch July 12, 2016 04:16
thefourtheye added a commit that referenced this pull request Jul 12, 2016
As the `no-build` and `build-only` options are not used anymore, they
can be safely removed.

PR-URL: #7620
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
thefourtheye added a commit that referenced this pull request Jul 12, 2016
The format specifier is incomplete and without this the program will
fail at runtime, with "incomplete format" error.

PR-URL: #7620
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
evanlucas pushed a commit that referenced this pull request Jul 15, 2016
As the `no-build` and `build-only` options are not used anymore, they
can be safely removed.

PR-URL: #7620
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
evanlucas pushed a commit that referenced this pull request Jul 15, 2016
The format specifier is incomplete and without this the program will
fail at runtime, with "incomplete format" error.

PR-URL: #7620
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@@ -33,7 +33,7 @@
shutil.rmtree(options.icusmall)

if not os.path.isdir(options.icusrc):
print 'Missing source ICU dir --icusrc=%' % (options.icusrc)
print 'Missing source ICU dir --icusrc=%s' % (options.icusrc)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops - missed this. thanks! +1

@MylesBorins
Copy link
Contributor

@thefourtheye setting as don't land on v4.x please feel free to send backport if it should be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants