From 11d9c203c1a4e11089b2e12fe50c0dd12fff4d9f Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Fri, 14 Jun 2019 12:53:02 +0200 Subject: [PATCH] Fix version.h file (#630) * Fix version.h file * Lint --- esphome/writer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/writer.py b/esphome/writer.py index 5edf68abb4..bda3f09df2 100644 --- a/esphome/writer.py +++ b/esphome/writer.py @@ -315,7 +315,7 @@ def copy_src_tree(): continue # Transform path to target path name target = os.path.relpath(path, CORE.relative_src_path()).replace(os.path.sep, '/') - if target == DEFINES_H_TARGET: + if target in (DEFINES_H_TARGET, VERSION_H_TARGET): # Ignore defines.h, will be dealt with later continue if target not in source_files_copy: @@ -341,7 +341,7 @@ def copy_src_tree(): write_file_if_changed(ESPHOME_H_FORMAT.format(include_s), CORE.relative_src_path('esphome.h')) write_file_if_changed(VERSION_H_FORMAT.format(__version__), - CORE.relative_src_path('esphome' 'core', 'version.h')) + CORE.relative_src_path('esphome', 'core', 'version.h')) def generate_defines_h():