summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 0c01cd2..0ee8bcc 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -1227,11 +1227,9 @@ if __name__ == '__main__':
# much of the testing framework relies on the globals in the
# test.support module.
mydir = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
- i = pathlen = len(sys.path)
+ i = len(sys.path)
while i >= 0:
i -= 1
if os.path.abspath(os.path.normpath(sys.path[i])) == mydir:
del sys.path[i]
- if len(sys.path) == pathlen:
- print('Could not find %r in sys.path to remove it' % mydir)
main()