]> code.ossystems Code Review - openembedded-core.git/commitdiff
spdx.bbclass: Replace deprecated string.replace with str.replace
authorOlof Johansson <olof.johansson@axis.com>
Mon, 16 Jul 2018 15:05:53 +0000 (17:05 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Jul 2018 09:13:30 +0000 (10:13 +0100)
The string.replace function is removed in python3. Instead, the str
method "replace" should be used instead.

Signed-off-by: Olof Johansson <olofjn@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/spdx.bbclass

index c5f544d2a4fccf279e49c6d314dc0358c319284e..ab2eaa5c0c1bc3c8c422cc69d35d7ae4e3de9f31 100644 (file)
@@ -226,7 +226,7 @@ def run_fossology(foss_command, full_spdx):
     except subprocess.CalledProcessError as e:
         return None
 
-    foss_output = string.replace(foss_output, '\r', '')
+    foss_output = foss_output.replace('\r', '')
 
     # Package info
     package_info = {}