mirror of
https://github.com/netbox-community/devicetype-library.git
synced 2025-02-16 18:31:21 +01:00
Update definitions_test.py
This commit is contained in:
parent
679de8f491
commit
a5050ebe41
@ -59,9 +59,12 @@ def _get_diff_from_upstream():
|
||||
# Ensure files are either added, renamed, modified or type changed (do not get deleted files)
|
||||
CHANGE_TYPE_LIST = ['A', 'R', 'M', 'T']
|
||||
|
||||
# Iterate through changed files
|
||||
for file in changes:
|
||||
# Ensure the files are modified or added, this will disclude deleted files
|
||||
if file.change_type in CHANGE_TYPE_LIST:
|
||||
if 'R' in file.change_type:
|
||||
# If the file is renamed, ensure we are picking the right schema
|
||||
if 'R' in file.change_type and path in file.rename_to:
|
||||
file_list.append((file.rename_to, schema))
|
||||
elif path in file.a_path:
|
||||
file_list.append((file.a_path, schema))
|
||||
|
Loading…
Reference in New Issue
Block a user