diff mbox series

[v2,06/14] dtoc: Rename the main module

Message ID 20200417180829.v2.6.I49ca7d6e43cb66942dfcf925e12f32e340932a6c@changeid
State Accepted
Commit 4d25fe2d952dd66d0f6c3f0dfdd4303e85d65333
Headers show
Series tools: patman: Convert Python tools to use absolute imports | expand

Commit Message

Simon Glass April 18, 2020, 12:08 a.m. UTC
Python does not like the module name being the same as the module
directory. To allow dtoc modules to be used from other tools, rename
it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 tools/dtoc/dtoc                 | 2 +-
 tools/dtoc/{dtoc.py => main.py} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename tools/dtoc/{dtoc.py => main.py} (98%)

Comments

Simon Glass April 27, 2020, 3:06 a.m. UTC | #1
Python does not like the module name being the same as the module
directory. To allow dtoc modules to be used from other tools, rename
it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 tools/dtoc/dtoc                 | 2 +-
 tools/dtoc/{dtoc.py => main.py} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename tools/dtoc/{dtoc.py => main.py} (98%)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/tools/dtoc/dtoc b/tools/dtoc/dtoc
index 896ca44e62..11a5d8e18a 120000
--- a/tools/dtoc/dtoc
+++ b/tools/dtoc/dtoc
@@ -1 +1 @@ 
-dtoc.py
\ No newline at end of file
+main.py
\ No newline at end of file
diff --git a/tools/dtoc/dtoc.py b/tools/dtoc/main.py
similarity index 98%
rename from tools/dtoc/dtoc.py
rename to tools/dtoc/main.py
index f7ed62cd67..ac0e364bf2 100755
--- a/tools/dtoc/dtoc.py
+++ b/tools/dtoc/main.py
@@ -77,7 +77,7 @@  def run_tests(args):
 def RunTestCoverage():
     """Run the tests and check that we get 100% coverage"""
     sys.argv = [sys.argv[0]]
-    test_util.RunTestCoverage('tools/dtoc/dtoc.py', '/dtoc.py',
+    test_util.RunTestCoverage('tools/dtoc/dtoc', '/main.py',
             ['tools/patman/*.py', '*/fdt*', '*test*'], options.build_dir)