Skip to content

Commit fc6c663

Browse files
committed
Pushing unchanged additional resource fixes
1 parent 3d3e5f2 commit fc6c663

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

toolchain/toolchain/python/icmtoolchain/device.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ def push_everything(push_unchanged: bool = True, cleanup_remote: bool = True) ->
173173
elif isdir(project_path):
174174
result = push_directory(project_path, remote_path, push_unchanged=remote_push_unchanged, cleanup_remote=remote_cleanup_remote, shell=shell)
175175
else:
176-
warn(f"* We cannot push {linked_resource['relative_path']} resource because we could not determine its type.")
176+
print()
177+
abort(f"We cannot push {linked_resource['relative_path']!r} resource because we could not determine its type!")
177178
if result != 0:
178179
return result
179180
if len(shell.interactables) == 0:
180181
progress = Progress("Up to date")
181182
shell.interactables.append(progress)
182183

183-
if not push_unchanged:
184-
GLOBALS.OUTPUT_STORAGE.save()
184+
GLOBALS.OUTPUT_STORAGE.save()
185185
return 0
186186

187187
def push_file(file: str, destination_file: str, push_unchanged: bool = True, cleanup_remote: bool = True, shell: Optional[Shell] = None) -> int:

toolchain/toolchain/python/icmtoolchain/mod_structure.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
from collections import namedtuple
21
import json
32
import os
4-
from os.path import isdir, isfile, join, relpath, basename
3+
from collections import namedtuple
4+
from os.path import basename, isdir, isfile, join, relpath
55
from typing import Any, Collection, Dict, Final, List, Optional
66

77
from . import GLOBALS
88
from .shell import warn
9-
from .utils import ensure_directory, ensure_file, ensure_file_directory, remove_tree
10-
9+
from .utils import (ensure_directory, ensure_file, ensure_file_directory,
10+
remove_tree)
1111

1212
BuildTargetType = namedtuple("BuildTargetType", "directory property")
1313

@@ -202,7 +202,7 @@ def append_resource(self, relative_path: str, output_path: str, **properties: An
202202
self.contents.append({
203203
"relative_path": relative_path,
204204
"output_path": output_path,
205-
**properties
205+
**{ key: value for key, value in properties.items() if value is not None }
206206
})
207207

208208
def iterate_resources(self):

0 commit comments

Comments
 (0)