Simplfy default user-agent header.

This commit is contained in:
Greg Neagle
2015-12-09 11:41:30 -08:00
parent fda740c046
commit c19f2d7936
+4 -5
View File
@@ -51,11 +51,10 @@ XATTR_SHA = 'com.googlecode.munki.sha256'
# default value for User-Agent header
machine = munkicommon.getMachineFacts()
darwin_version = os.uname()[2]
python_version = "%d.%d.%d" % sys.version_info[:3]
cfnetwork_version = FoundationPlist.readPlist("/System/Library/Frameworks/CFNetwork.framework/Resources/Info.plist")['CFBundleShortVersionString']
DEFAULT_USER_AGENT = "Python/%s CFNetwork/%s managedsoftwareupdate/%s Darwin/%s (%s) (%s)" % (
python_version, cfnetwork_version, machine['munki_version'],
darwin_version, machine['arch'], machine['machine_model'])
#python_version = "%d.%d.%d" % sys.version_info[:3]
#cfnetwork_version = FoundationPlist.readPlist("/System/Library/Frameworks/CFNetwork.framework/Resources/Info.plist")['CFBundleShortVersionString']
DEFAULT_USER_AGENT = "managedsoftwareupdate/%s Darwin/%s" % (
machine['munki_version'], darwin_version)
class GurlError(Exception):