diff options
author | 2015-09-03 13:59:44 +0000 | |
---|---|---|
committer | 2015-09-03 14:42:33 +0000 | |
commit | 54733f93471af0cbe63e9f32a522971dbd193a3e (patch) | |
tree | d7ae030fd727d129f80dd137cf6df3f5ba4fba41 /src/main/java/com/google/devtools/build/lib/rules/python | |
parent | 31d6bba4ec2041926063d26c7b53befcb647e8d5 (diff) |
Code cleanup
--
MOS_MIGRATED_REVID=102239051
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/python')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java b/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java index fe9c2b6257..23f19a9b34 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java +++ b/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java @@ -270,11 +270,12 @@ public final class PyCommon { + "' need to be converted to Python 2 (not yet implemented)"); } } - if (targetVersion == PythonVersion.PY3 || targetVersion == PythonVersion.PY2AND3) { - if (sourceVersion == PythonVersion.PY2ONLY) { - ruleContext.ruleError("Rule '" + source - + "' can only be used with Python 2, and cannot be converted to Python 3"); - } + if ((targetVersion == PythonVersion.PY3 || targetVersion == PythonVersion.PY2AND3) + && sourceVersion == PythonVersion.PY2ONLY) { + ruleContext.ruleError( + "Rule '" + + source + + "' can only be used with Python 2, and cannot be converted to Python 3"); } } |