macadmins / installapplications

A tool for dynamically using installapplication
Apache License 2.0
285 stars 62 forks source link

applying black linting #97

Closed chilcote closed 3 years ago

chilcote commented 3 years ago

My apologies for this. What happened is Nick flew to Seattle and came to my house, and stared at me until I agreed to run this through black.

Test plan:

I built an updated IAs package, and ran it on an unsuspecting test Mac. Everything passed.

2021-08-13 13:11:41.829 Python[14445:120085] [InstallApplications] Beginning InstallApplications run
2021-08-13 13:11:41.829 Python[14445:120085] [InstallApplications] InstallApplications path: /Library/installapplications
2021-08-13 13:11:41.829 Python[14445:120085] [InstallApplications] InstallApplications LaunchDaemon path: /Library/LaunchDaemons/com.erikng.installapplications.plist
2021-08-13 13:11:41.829 Python[14445:120085] [InstallApplications] InstallApplications LaunchAgent path: /Library/LaunchAgents/com.erikng.installapplications.plist
2021-08-13 13:11:41.829 Python[14445:120085] [InstallApplications] InstallApplications json path: /Library/installapplications/bootstrap.json
2021-08-13 13:11:41.829 Python[14445:120085] [InstallApplications] Beginning preflight
.
.
.
.
<snip>
.
.
.
.
2021-08-13 13:13:52.777 Python[14445:120085] [InstallApplications] Attempting to remove LaunchDaemon: /Library/LaunchDaemons/com.erikng.installapplications.plist
2021-08-13 13:13:52.777 Python[14445:120085] [InstallApplications] Attempting to remove LaunchAgent: /Library/LaunchAgents/com.erikng.installapplications.plist
2021-08-13 13:13:52.777 Python[14445:120085] [InstallApplications] Targeting user id for LaunchAgent removal: 501
2021-08-13 13:13:52.777 Python[14445:120085] [InstallApplications] Attempting to remove LaunchAgent: com.erikng.installapplications
2021-08-13 13:13:52.814 Python[14445:120085] [InstallApplications] Attempting to remove InstallApplications directory: /Library/installapplications
2021-08-13 13:13:53.361 Python[14445:120085] [InstallApplications] Attempting to remove LaunchDaemon: com.erikng.installapplications
2021-08-13 13:13:53.363 Python[14445:120085] [InstallApplications] Cleanup done. Exiting.
erikng commented 3 years ago

Did NSLog work? That's the only thing I would be worried about here.

chilcote commented 3 years ago

Yep, for instance, this

    iaslog(
        "Downloading %s - Percent complete: %s "
        % (filename, percent_complete)
    )

from the installapplications.log, produces this:

2021-08-13 13:11:45.663 Python[14445:120085] [InstallApplications] Downloading DEP Notify - Percent complete: 0 
2021-08-13 13:11:45.830 Python[14445:120085] [InstallApplications] Downloading DEP Notify - Percent complete: 10 
2021-08-13 13:11:45.962 Python[14445:120085] [InstallApplications] Downloading DEP Notify - Percent complete: 48 
2021-08-13 13:11:46.117 Python[14445:120085] [InstallApplications] Downloading DEP Notify - Percent complete: 85