ds-backup.py - confusion

Martin Langhoff martin.langhoff at gmail.com
Thu May 1 02:57:24 EDT 2008

Hi Tomeu, list

I'm no Python wiz (that's well known ;-) ) but I can't get
ds-backup.py to do anything for me... :-/ Hopefully these questions
are not too clueless...

 - How do I execute it so that it _does_ something? `python
ds-backup.py` doesn't do much, and tracing it with a debugger doesn't
help. That strange (for me) way of trying to trigger some code as
"main" function by testing for __main__ at the bottom is... well...

 - Are the "error classes" defined at the top empty? Can we just error
out with classic error codes that can be handled by callers? (AFAICT
throwing exceptions like that forces our hand into calling this via
Python to get decent error handling - good ol' error codes will work
with callers regardless of language or colour of skin).

I was hoping to attempt a couple of relatively simple patches, but the
XO environment is still a bit to unfamiliar to me...

 - Remove the dependency on simplejson.py. The 703 build includes
other json libs which we can use instead.

 - Change the metadata export to cover (a) all the metadata and (b)
create one file per document.

 - Change the rsync line.

Can anyone lend me a bit of a hand with this via email / irc? I'll try
and be up early tomorrow (NZ time) to match the afternoon in East
Coast US.


 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff

More information about the Devel mailing list