diff mbox series

[V1] framework/main: fix warning of syntax

Message ID 1596069418-28850-1-git-send-email-lihongx.ma@intel.com (mailing list archive)
State Accepted
Headers show
Series [V1] framework/main: fix warning of syntax | expand

Commit Message

Ma, LihongX July 30, 2020, 12:36 a.m. UTC
From: "LihongX, Ma" <lihongx.ma@intel.com>

when use python3.8, it will warning of cmd 'ret is not 0', fix
this warning.

Signed-off-by: LihongX Ma <lihongx.ma@intel.com>
---
 framework/main.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tu, Lijuan Aug. 12, 2020, 6:55 a.m. UTC | #1
> Subject: [dts] [PATCH V1] framework/main: fix warning of syntax
> 
> when use python3.8, it will warning of cmd 'ret is not 0', fix this warning.
> 
> Signed-off-by: LihongX Ma <lihongx.ma@intel.com>
> ---
>  framework/main.py | 4 ++--

Applied
diff mbox series

Patch

diff --git a/framework/main.py b/framework/main.py
index b5e5952..f6e3ae9 100755
--- a/framework/main.py
+++ b/framework/main.py
@@ -59,13 +59,13 @@  def git_build_package(gitLabel, pkgName, depot="dep"):
     else:
         print("git clone %s %s/%s" % (gitURL, depot, gitPrefix))
         ret = os.system("git clone %s %s/%s" % (gitURL, depot, gitPrefix))
-    if ret is not 0:
+    if ret != 0:
         raise EnvironmentError
 
     print("git archive --format=tar.gz --prefix=%s %s -o %s" % (gitPrefix, gitLabel, pkgName))
     ret = os.system("cd %s/%s && git archive --format=tar.gz --prefix=%s/ %s -o ../%s"
                     % (depot, gitPrefix, gitPrefix, gitLabel, pkgName))
-    if ret is not 0:
+    if ret != 0:
         raise EnvironmentError