meta/classes/dpkg-base: remove os module in python function

Message ID 20241012132910.1298091-1-srinuvasan.a@siemens.com
State Accepted, archived
Headers show
Series meta/classes/dpkg-base: remove os module in python function | expand

Commit Message

srinuvasan.a Oct. 12, 2024, 1:29 p.m. UTC
From: srinuvasan <srinuvasan.a@siemens.com>

By default os module imported in python function,
hence remove this import from the "isar_export_build_settings" function.

Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
---
 meta/classes/dpkg-base.bbclass | 1 -
 1 file changed, 1 deletion(-)

Comments

Uladzimir Bely Oct. 21, 2024, 10:51 a.m. UTC | #1
On Sat, 2024-10-12 at 18:59 +0530, srinuvasan.a via isar-users wrote:
> From: srinuvasan <srinuvasan.a@siemens.com>
> 
> By default os module imported in python function,
> hence remove this import from the "isar_export_build_settings"
> function.
> 
> Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> ---
>  meta/classes/dpkg-base.bbclass | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-
> base.bbclass
> index c97ee651..2eb6bfbd 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -231,7 +231,6 @@ def isar_deb_build_options(d):
>  
>  # use with caution: might contaminate multiple tasks
>  def isar_export_build_settings(d):
> -    import os
>      os.environ['DEB_BUILD_OPTIONS']  = isar_deb_build_options(d)
>      os.environ['DEB_BUILD_PROFILES'] = isar_deb_build_profiles(d)
>  
> -- 
> 2.39.5
> 

Applied to next, thanks.

Patch

diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index c97ee651..2eb6bfbd 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -231,7 +231,6 @@  def isar_deb_build_options(d):
 
 # use with caution: might contaminate multiple tasks
 def isar_export_build_settings(d):
-    import os
     os.environ['DEB_BUILD_OPTIONS']  = isar_deb_build_options(d)
     os.environ['DEB_BUILD_PROFILES'] = isar_deb_build_profiles(d)