I have been trying to sus out what is calling Python2(deprecated path) in my deployment workflow as we now get the JAMF Agent error that many others are seeing. I have finally narrowed it down as to where it is...yet no idea how to correct it. it looks like the script for calling/configuring DEP Notify that was supplied a while back has one single python call to get the current user:
# After the Apple Setup completed. Now safe to grab the current user.
CURRENT_USER=$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\\n");')
echo "$(date "+%a %h %d %H:%M:%S"): Current user set to $CURRENT_USER." >> "$DEP_NOTIFY_DEBUG"Does anyone have any recommendations as to how to correct/change this bit? I've tried a few things and keep getting errors, yet this is a pretty complex script so I figured I would reach out.
