Skip to content

Commit 71841b8

Browse files
committed
[tools] keil.py Improve error messages.
1 parent 310f1ea commit 71841b8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/keil.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ def MDK45Project(tree, target, script):
281281
out.close()
282282

283283
def MDK4Project(target, script):
284+
285+
if os.path.isfile('template.uvproj') is False:
286+
print ('Warning: The template project file [template.uvproj] not found!')
287+
return
288+
284289
template_tree = etree.parse('template.uvproj')
285290

286291
MDK45Project(template_tree, target, script)
@@ -297,6 +302,10 @@ def MDK4Project(target, script):
297302

298303
def MDK5Project(target, script):
299304

305+
if os.path.isfile('template.uvprojx') is False:
306+
print ('Warning: The template project file [template.uvprojx] not found!')
307+
return
308+
300309
template_tree = etree.parse('template.uvprojx')
301310

302311
MDK45Project(template_tree, target, script)

0 commit comments

Comments
 (0)