summaryrefslogtreecommitdiff
path: root/archaeological_operations/management/commands/import_operations.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2013-06-11 16:26:01 +0000
committerÉtienne Loks <etienne.loks@proxience.com>2013-06-11 16:26:01 +0000
commitf62c9ae82ab1306a558f4cf025a6fb85b71d2941 (patch)
tree15e04c15041d7a04a810b7d30fbe1ccfd4559fa9 /archaeological_operations/management/commands/import_operations.py
parent7a0aa6fae769bc2732247fb4abc7e803e3243213 (diff)
parenta03552fe269095fe521106c561c470f774e41909 (diff)
downloadIshtar-f62c9ae82ab1306a558f4cf025a6fb85b71d2941.tar.bz2
Ishtar-f62c9ae82ab1306a558f4cf025a6fb85b71d2941.zip
Merge branch 'master' of lysithea.proxience.net:/home/proxience/git/ishtar
Diffstat (limited to 'archaeological_operations/management/commands/import_operations.py')
-rwxr-xr-xarchaeological_operations/management/commands/import_operations.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/archaeological_operations/management/commands/import_operations.py b/archaeological_operations/management/commands/import_operations.py
index 0c842184b..a9ecf41c9 100755
--- a/archaeological_operations/management/commands/import_operations.py
+++ b/archaeological_operations/management/commands/import_operations.py
@@ -28,16 +28,16 @@ IMPORTERS = {'csv':import_from_csv,
'vfp':import_from_dbf}
class Command(BaseCommand):
- args = '<filename> [<update> <csv|dbf> <lines>]'
+ args = '<filename> [<lines>]'
help = "Import archaelogical operations"
def handle(self, *args, **options):
if not args or not args[0]:
raise CommandError("No file provided.")
filename = args[0]
- update = len(args) > 1 and args[1]
- file_type = len(args) > 2 and args[2]
- lines = len(args) > 3 and args[3]
+ update = True
+ file_type = None
+ lines = len(args) > 1 and args[1]
if not file_type:
suffix = filename.split('.')[-1].lower()
if suffix in IMPORTERS.keys():