[elbe-devel] [PATCH 3/3] validate, filesystem, shellhelper: fix style errors
Olivier Dion
dion at linutronix.de
Wed Sep 18 18:31:07 CEST 2019
On 2019-09-18T09:28:30-0400, Akash Satamkar <akash at linutronix.de> wrote:
> + if env_add is None:
> + env_add = {}
> new_env.update(env_add)
Change the diff to
----------------------------------------------------------------------
+ if env_add is not None:
+ new_env.update(env_add)
- new_env.update(env_add)
----------------------------------------------------------------------
there's no need to create a dict every time. This function is call a
billion times in elbe (ok maybe not, but it's very hot). Using env_add
as a nullable option is the right way to do it.
--
Olivier Dion
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
More information about the elbe-devel
mailing list