Question #80233 on NSsbackup changed:
https://answers.launchpad.net/nssbackup/+question/80233

Description changed to:
Hello,

I spend much time writing scripts for different profiles under sbackup
and now I found this great program which can do much more. I used the
configuration tool and created two profiles, but unfortunately not in
the order I want them to be executed. One of them has a local and one
has a remote target and I'd like the local to be the first one. Is there
any way to set an order?

PS:
I figured the relevant part is the command cfiles = os.listdir( confdir ) in 
def __retrieve_confm(self): in nssbackupd.py. The documentation 
http://docs.python.org/library/os.html says: The list is in arbitrary order.
According to my tests with the configuration gui the order is the same as in 
"ls -U" (list entries in directory order, whatever this is). Renaming the 
second configuration file helped in a sense that the gui shows my desired order 
(and so the execution will probably in the same, though it does not use the 
same function, but the same listdir command).

My idea (as a non-python programmer) is to add right below the listdir
command a cfiles.sort() commmand which should sort the list according to
the built-in comparators of the unicode resp string classes. I can
confirm this works for the gui when applied to the config manager. I
hope (and will see tomorrow) if it works when I add a sort after all
os.listdir's (I guess better too many than too view, there are just a
couple of them). For the next version I suggest this as default, because
then its very easy to set an order by adding prefixes to the config file
names.

-- 
You received this question notification because you are a member of
NSsbackup team, which is an answer contact for NSsbackup.

_______________________________________________
Mailing list: https://launchpad.net/~nssbackup-team
Post to     : nssbackup-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~nssbackup-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to