Hello, Attached a patch for copy-to-journal.py which adds auto-detection of the MIME type! Hope you find this useful. This has been suggested in the thread "How to create a new MIME type for a Sugar activity?", and may be elsewhere, and probably makes sense in order to make copy-to-journal more end-user friendly.
Sorry for not providing a real git diff; this form was easier for me. I'll get to git, promise. (Actually - how does one get a git account on dev.laptop.org anyways? Just asking.) Once you commit this, http://wiki.laptop.org/go/Copy_to_and_from_the_Journal needs to be updated. I can do it if you want after you've applied the diff to git. A MIME stuff unrelated problem report / question: With big (e.g. 70 MB) files, I get a "Error: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken." from copy-to-journal. Should some DBus timeout (what? where? how?) be increased somehow for this to work more reliably? Also noticed that Journal or the API isn't particularly "transactional" - that's probably normal and doesn't surprised you guys, or is this not normal? (The presumably only partially imported file shows up in the Journal... I would have expected it not to, as the 'import' failed with an error.) Minor: The attached patch also has a really minor bugfix, destroy should be in finally; found that when looking into above NoReply Error. Regards, Michael On Mon, Dec 24, 2007 at 6:14 PM, Phil Bordelon <[EMAIL PROTECTED]> wrote: > Reinier Heeres wrote: > > Hi, > > > > I just added a simple script to do this to the ticket about fetching > > objects from the datastore (#5571). > > > > Please feel free to extend it! > > Thanks for proving me wrong on the complexity front. :) > > I didn't change much of your code here; I just spruced up the text to > look more like copy-to-journal, and added comments throughout so that > later generations of code-spelunkers can understand what the heck we > are doing in the program. > > Thanks so much for taking the time to do this; copy-from-journal is > easily one of the most requested features in #olpc-help. > > > > Phil > _______________________________________________ > Devel mailing list > [email protected] > http://lists.laptop.org/listinfo/devel > -- _______________________ Michael Vorburger http://www.vorburger.ch
copy-to-journal.py.diff
Description: Binary data
_______________________________________________ Devel mailing list [email protected] http://lists.laptop.org/listinfo/devel
