diff options
| author | Anthony Sottile <asottile@umich.edu> | 2019-02-25 14:32:27 -0800 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-25 23:32:27 +0100 |
| commit | 8377cd4fcd0d51d86834c9b0518d29aac3b49e18 (patch) | |
| tree | e8d82c3567b2d39ff0bd285d25ce2d02359ae070 /Lib/test/libregrtest | |
| parent | 9c3f284de598550be6687964c23fd7599e53b20e (diff) | |
| download | cpython-git-8377cd4fcd0d51d86834c9b0518d29aac3b49e18.tar.gz | |
Clean up code which checked presence of os.{stat,lstat,chmod} (#11643)
Diffstat (limited to 'Lib/test/libregrtest')
| -rw-r--r-- | Lib/test/libregrtest/runtest.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/libregrtest/runtest.py b/Lib/test/libregrtest/runtest.py index dc2abf237b..4f218b769f 100644 --- a/Lib/test/libregrtest/runtest.py +++ b/Lib/test/libregrtest/runtest.py @@ -249,10 +249,8 @@ def cleanup_test_droppings(testname, verbose): if verbose: print("%r left behind %s %r" % (testname, kind, name)) try: - # if we have chmod, fix possible permissions problems - # that might prevent cleanup - if (hasattr(os, 'chmod')): - os.chmod(name, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) + # fix possible permissions problems that might prevent cleanup + os.chmod(name, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) nuker(name) except Exception as msg: print(("%r left behind %s %r and it couldn't be " |
