-
Notifications
You must be signed in to change notification settings - Fork 23
Pr15 split part2 #17
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
Merged
Merged
Pr15 split part2 #17
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Qin Zhang (张琴) <[email protected]>
Signed-off-by: Qin Zhang (张琴) <[email protected]>
Signed-off-by: Qin Zhang (张琴) <[email protected]>
Signed-off-by: Qin Zhang (张琴) <[email protected]>
Signed-off-by: Qin Zhang (张琴) <[email protected]>
fa04bb3 to
29b1793
Compare
liulinC
approved these changes
Oct 30, 2023
andyhhp
approved these changes
Oct 30, 2023
minglumlu
approved these changes
Nov 1, 2023
|
Since we actually have at least two approves (from Andy and Lin), merge it now. |
bernhardkaindl
added a commit
that referenced
this pull request
Nov 24, 2023
…usoutput() Fix the 1st commit of #17 which replaced commands.getstatusoutput() with subprocess.getstatusoutput() without taking the change of the status code into account: Unfortunately, the Python3 developers broke the compatibilty: The return code changes: python2 -c 'import commands ; print( commands.getstatusoutput("false"))' (256, '') python3 -c 'import subprocess; print(subprocess.getstatusoutput("false"))' (1, '') With commands.getstatusoutput(), you had to use this to get the actual exit code: status = os.WEXITSTATUS(status) These calls have to be removed because now they just shift away the error code: As shown at benjaminp/six#207, the operation is just `status >> 8` Lucily, the status code is checked to against 0 at most places, so there is no change for these checks. There is only one location where a bit is checked. Fix this location too. Also, that commit did not take into account that subprocess.get*output do not exist in Python2, which goes against the directive by Andrew in PR #16 where he requires that we keep Python2 working: The current master branch works neither for Python2, nor Python3 - fix this breakage in the 2nd commit. Signed-off-by: Bernhard Kaindl <[email protected]>
bernhardkaindl
added a commit
that referenced
this pull request
Nov 24, 2023
…usoutput() Fix the 1st commit of #17 which replaced commands.getstatusoutput() with subprocess.getstatusoutput() without taking the change of the status code into account: Unfortunately, the Python3 developers broke the compatibility: The return code changes: python2 -c 'import commands ; print( commands.getstatusoutput("false"))' (256, '') python3 -c 'import subprocess; print(subprocess.getstatusoutput("false"))' (1, '') With commands.getstatusoutput(), you had to use this to get the actual exit code: status = os.WEXITSTATUS(status) These calls have to be removed because now they just shift away the error code: As shown at benjaminp/six#207, the operation is just `status >> 8` Luckily, the status code is checked to against 0 at most places, so there is no change for these checks. There is only one location where a bit is checked. Fix this location too. Also, that commit did not take into account that subprocess.get*output do not exist in Python2, which goes against the directive by Andrew in PR #16 where he requires that we keep Python2 working: The current master branch works neither for Python2, nor Python3 - fix this breakage in the 2nd commit. Signed-off-by: Bernhard Kaindl <[email protected]>
bernhardkaindl
added a commit
that referenced
this pull request
Nov 28, 2023
…usoutput() Fix the 1st commit of #17 which replaced commands.getstatusoutput() with subprocess.getstatusoutput() without taking the change of the status code into account: Unfortunately, the Python3 developers broke the compatibility: The return code changes: python2 -c 'import commands ; print( commands.getstatusoutput("false"))' (256, '') python3 -c 'import subprocess; print(subprocess.getstatusoutput("false"))' (1, '') With commands.getstatusoutput(), you had to use this to get the actual exit code: status = os.WEXITSTATUS(status) These calls have to be removed because now they just shift away the error code: As shown at benjaminp/six#207, the operation is just `status >> 8` Luckily, the status code is checked to against 0 at most places, so there is no change for these checks. There is only one location where a bit is checked. Fix this location too. Also, that commit did not take into account that subprocess.get*output do not exist in Python2, which goes against the directive by Andrew in PR #16 where he requires that we keep Python2 working: The current master branch works neither for Python2, nor Python3 - fix this breakage in the 2nd commit. Signed-off-by: Bernhard Kaindl <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split part2 out of #15
This is literally just converting 'commands' to 'subprocess', updating 'print' syntax, converting 'iteritems' to 'items', removing the use of 'types' and some misc changes.