[Fix build on systems with Python 3 3/3] qmi-codegen python3: change string.lower(str) to str.lower()

Shawn J. Goff shawn7400 at gmail.com
Mon Dec 17 13:29:17 PST 2012


From: "Shawn J. Goff" <shawn.goff at accelecon.com>

The string.lower(str) class method is no longer available.

sed regex:
s/string\.lower(\(.*\))/\1.lower()/
---
 build-aux/qmi-codegen/MessageList.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/build-aux/qmi-codegen/MessageList.py b/build-aux/qmi-codegen/MessageList.py
index ac375fe..c3207d5 100644
--- a/build-aux/qmi-codegen/MessageList.py
+++ b/build-aux/qmi-codegen/MessageList.py
@@ -109,7 +109,7 @@ class MessageList:
     messages of a given service.
     """
     def __emit_get_printable(self, hfile, cfile):
-        translations = { 'service'    : string.lower(self.service) }
+        translations = { 'service'    : self.service.lower() }
 
         template = (
             '\n'
@@ -175,7 +175,7 @@ class MessageList:
     introduced.
     """
     def __emit_get_version_introduced(self, hfile, cfile):
-        translations = { 'service'    : string.lower(self.service) }
+        translations = { 'service'    : self.service.lower() }
 
         template = (
             '\n'
-- 
1.8.0.2



More information about the libqmi-devel mailing list