mirror of
https://github.com/esphome/esphome.git
synced 2025-09-10 15:22:24 +01:00
Use copy for custom includes (#568)
This commit is contained in:
@@ -157,6 +157,12 @@ def copy_file_if_changed(src, dst):
|
||||
write_file(dst, src_text)
|
||||
|
||||
|
||||
def walk_files(path):
|
||||
for root, _, files in os.walk(path):
|
||||
for name in files:
|
||||
yield os.path.join(root, name)
|
||||
|
||||
|
||||
def read_file(path):
|
||||
try:
|
||||
with codecs.open(path, 'r', encoding='utf-8') as f_handle:
|
||||
|
Reference in New Issue
Block a user