diff mbox

[U-Boot,v2,04/10] patman: Import 'configparser' lower case to be python 3.x safe

Message ID 20160927150358.6248-5-paul.burton@imgtec.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Paul Burton Sept. 27, 2016, 3:03 p.m. UTC
In python 3.x module names used in import statements are case sensitive,
and the configparser module is named in all lower-case. Import it as such
in order to avoid errors when running with python 3.x.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 tools/patman/settings.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Simon Glass Oct. 6, 2016, 2:02 a.m. UTC | #1
On 27 September 2016 at 09:03, Paul Burton <paul.burton@imgtec.com> wrote:
> In python 3.x module names used in import statements are case sensitive,
> and the configparser module is named in all lower-case. Import it as such
> in order to avoid errors when running with python 3.x.
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>  tools/patman/settings.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

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

Patch

diff --git a/tools/patman/settings.py b/tools/patman/settings.py
index 01f6c38..3caf379 100644
--- a/tools/patman/settings.py
+++ b/tools/patman/settings.py
@@ -5,7 +5,11 @@ 
 
 from __future__ import print_function
 
-import ConfigParser
+try:
+    import configparser as ConfigParser
+except:
+    import ConfigParser
+
 import os
 import re