macadmins / installapplications

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

NSLog doesn't handle certain URLs #23

Closed erikng closed 6 years ago

erikng commented 6 years ago

When passed a url like the following (https://chefitpublic.file.core.windows.net/chefdeploy/bootstrap.json?sv=2017-04-17&ss=f&srt=so&sp=rl&se=2018-11-28T23:56:02Z&st=2017-11-28T15:56:02Z&spr=https&sig=b8%2FgLAzKtyHGTes0fe5SyWlIqs5p2ucUtLOmwBgW2a4%3D) Lines 278 and 446 will break with the following error:

  File "/Library/Application Support/installapplications/installapplications.py", line 654, in <module>
    main()
  File "/Library/Application Support/installapplications/installapplications.py", line 446, in main
    iaslog('Starting download: %s' % (json_data['url']))
  File "/Library/Application Support/installapplications/installapplications.py", line 56, in iaslog
    NSLog('[InstallApplications] ' + text)
ValueError: Too few arguments for format string [cur:1/len:1]

Reported by John McCrae

erikng commented 6 years ago

fixed with https://github.com/erikng/installapplications/commit/c5d2b20c57f7d76895e8d331c5dbf6ba83150a05