Mercurial > p > roundup > code
comparison roundup/admin.py @ 1476:5a01e90b7dc9
fixed export/import of retired nodes [SF#685273]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 26 Feb 2003 23:42:54 +0000 |
| parents | 378081f066cc |
| children | b3f2484babce |
comparison
equal
deleted
inserted
replaced
| 1475:9f62905246c3 | 1476:5a01e90b7dc9 |
|---|---|
| 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 18 # | 18 # |
| 19 # $Id: admin.py,v 1.38 2003-02-25 10:19:31 richard Exp $ | 19 # $Id: admin.py,v 1.39 2003-02-26 23:42:49 richard Exp $ |
| 20 | 20 |
| 21 '''Administration commands for maintaining Roundup trackers. | 21 '''Administration commands for maintaining Roundup trackers. |
| 22 ''' | 22 ''' |
| 23 | 23 |
| 24 import sys, os, getpass, getopt, re, UserDict, shlex, shutil | 24 import sys, os, getpass, getopt, re, UserDict, shlex, shutil |
| 920 properties = cl.getprops() | 920 properties = cl.getprops() |
| 921 propnames = properties.keys() | 921 propnames = properties.keys() |
| 922 propnames.sort() | 922 propnames.sort() |
| 923 print >> f, p.join(propnames) | 923 print >> f, p.join(propnames) |
| 924 | 924 |
| 925 # all nodes for this class | 925 # all nodes for this class (not using list() 'cos it doesn't |
| 926 for nodeid in cl.list(): | 926 # include retired nodes) |
| 927 | |
| 928 for nodeid in self.db.getnodeids(classname): | |
| 929 # get the regular props | |
| 927 print >>f, p.join(cl.export_list(propnames, nodeid)) | 930 print >>f, p.join(cl.export_list(propnames, nodeid)) |
| 928 return 0 | 931 return 0 |
| 929 | 932 |
| 930 def do_import(self, args): | 933 def do_import(self, args): |
| 931 '''Usage: import import_dir | 934 '''Usage: import import_dir |
