Skip to content

Commit e4f44d3

Browse files
committed
Add else statement with logging
1 parent 8007581 commit e4f44d3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

jamf2snipe

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,11 @@ for jamf_type in jamf_types:
794794
jamf_asset_tag = 'jamfid-m-{}'.format(jamf['general']['id'])
795795
elif jamf_type == 'computers':
796796
jamf_asset_tag = 'jamfid-{}'.format(jamf['general']['id'])
797+
else:
798+
logging.error("Could not generate an asset tag for this device. Skipping")
799+
# Dump the object for debugging.
800+
logging.verbose(jamf)
801+
continue
797802
#raise SystemError('No such attribute {} in the jamf payload. Please check your settings.conf file'.format(tag_split))
798803
if jamf_asset_tag == None or jamf_asset_tag == '':
799804
logging.debug('No custom configuration found in settings.conf for asset tag name upon asset creation.')

0 commit comments

Comments
 (0)