Changeset 9563


Ignore:
Timestamp:
Aug 25, 2011, 1:16:15 PM (13 years ago)
Author:
rick
Message:

Order matters, make sure files are imported the right way

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/gheat/management/commands/import_kismet.py

    r9562 r9563  
    178178      raise CommandError("Not all arguments are provided")
    179179
     180    # Please first the netxml and then the gpsxml files
     181    sorted_args = [x for x in args if "netxml" in x] + [x for x in args if "gpsxml" in x]
     182    remainder = list(set(args) - set(sorted_args))
     183    args = sorted_args + remainder
     184    logger.debug("Parsing files in the following order: %s", args)
     185
    180186    for xml_file in args:
    181187      if not os.path.isfile(xml_file):
    182188        raise CommandError("xml file '%s' does not exists" % xml_file)
    183 
    184189
    185190    for xml_file in args:
Note: See TracChangeset for help on using the changeset viewer.