Mercurial > p > roundup > code
comparison roundup/admin.py @ 1529:96dcb9cb6d6f maint-0.5
only look for csv files on import
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 18 Mar 2003 23:19:22 +0000 |
| parents | 3a853f1c20b5 |
| children |
comparison
equal
deleted
inserted
replaced
| 1527:0efa958aad23 | 1529:96dcb9cb6d6f |
|---|---|
| 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.35.2.1 2003-02-06 05:44:49 richard Exp $ | 19 # $Id: admin.py,v 1.35.2.2 2003-03-18 23:19:22 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 |
| 937 'Get it from: http://www.object-craft.com.au/projects/csv/') | 937 'Get it from: http://www.object-craft.com.au/projects/csv/') |
| 938 | 938 |
| 939 from roundup import hyperdb | 939 from roundup import hyperdb |
| 940 | 940 |
| 941 for file in os.listdir(args[0]): | 941 for file in os.listdir(args[0]): |
| 942 # we only care about CSV files | |
| 943 if not file.endswith('.csv'): | |
| 944 continue | |
| 945 | |
| 942 f = open(os.path.join(args[0], file)) | 946 f = open(os.path.join(args[0], file)) |
| 943 | 947 |
| 944 # get the classname | 948 # get the classname |
| 945 classname = os.path.splitext(file)[0] | 949 classname = os.path.splitext(file)[0] |
| 946 | 950 |
