Skip to content

Commit

Permalink
[lldb] Move the python module import workaround further up
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-prantl committed Dec 7, 2024
1 parent 02ad623 commit 9f98949
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lldb/examples/python/formatter_bytecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@ def next_byte():


if __name__ == "__main__":
# Work around the fact that one of the local files is called
# types.py, which breaks some versions of python.
import os, sys

path = os.path.abspath(os.path.dirname(__file__))
sys.path.remove(path)
import argparse

parser = argparse.ArgumentParser(
Expand All @@ -487,12 +493,6 @@ def next_byte():
# Tests.
############################################################################
if args.test:
# Work around the fact that one of the local files is calles
# types.py, which breaks some versions of python.
import os, sys

path = os.path.abspath(os.path.dirname(__file__))
sys.path.remove(path)
import unittest

class TestCompiler(unittest.TestCase):
Expand Down

0 comments on commit 9f98949

Please sign in to comment.