mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Revert "Clear Python 2 .pyc files when Python 3 suite runs"
This reverts commit 7a60cfd171
.
This commit is contained in:
parent
dafd2fc61f
commit
8c360dd3fb
1 changed files with 0 additions and 11 deletions
|
@ -16,17 +16,6 @@ if os.name == 'nt':
|
|||
TESTS_DIR = TESTS_DIR.replace('\\', '\\\\')
|
||||
CODE_DIR = os.path.dirname(TESTS_DIR)
|
||||
|
||||
if sys.version_info.major == 3:
|
||||
# Clean up any Python 2 byte-compiled files, as they will cause problems
|
||||
# when Python 3 tries to import modules.
|
||||
for root, _, files in os.walk(os.path.dirname(TESTS_DIR)):
|
||||
if os.path.basename(root) == '__pycache__':
|
||||
# Ignore byte-compiled files in Python 3 __pycache__ dirs
|
||||
continue
|
||||
for filename in files:
|
||||
if filename.endswith('.pyc'):
|
||||
os.remove(os.path.join(root, filename))
|
||||
|
||||
# Let's inject CODE_DIR so salt is importable if not there already
|
||||
if '' in sys.path:
|
||||
sys.path.remove('')
|
||||
|
|
Loading…
Add table
Reference in a new issue