I only see three occurrences of this write, all being in
managedsoftwareupdate:
http://www.google.com/codesearch?hl=en&lr=&q=defaults',+'write'+package:http://munki\.googlecode\.com&sbtn=Search
- Justin
That's just how the defaults command works - it converts to binary
plists on write no matter what the original format was.
You'd need to code this with Cocoa classes or plistlib to write it out as XML1.
>
> I only see three occurrences of this write, all being in
> managedsoftwareupdate:
> http://www.google.com/codesearch?hl=en&lr=&q=defaults',+'write'+package:http://munki\.googlecode\.com&sbtn=Search
>
> - Justin
>
> --
> You received this message because you are subscribed to the Google Groups "munki-dev" group.
> To post to this group, send email to munk...@googlegroups.com.
> To unsubscribe from this group, send email to munki-dev+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/munki-dev?hl=en.
>
>
--
Ed Marczak
e: mar...@radiotope.com
w: http://www.radiotope.com/writing
MacTech Conference: http://www.mactech.com/conference
Sent from my iPad
plistlib cannot read binary plists. FoundationPlist can it seems, but
I'd like to use the standard py libraries whenever possible. It's
also nice to be able to view/modify the plist in a text editor, after
all we are starting with XML.....
> Generally, I find it best to not assume anything about the format of a plist. Even if we are careful in munki's code to make sure a plist remains in XML format, an administrator can use the defaults command on their own and ruin your assumptions.
we could immediately convert to XML whenever munki runs, then assume
it's XML after that until the next run. I guess that still leaves
room for admins to stomp on your toes in between though.
The NSPropertyListSerialization class will read plists in either
format and write them in the format that was read in.
-Greg