Ignore:
Timestamp:
May 10, 2011, 6:52:35 PM (14 years ago)
Author:
rick
Message:

Make the import more robust.

File:
1 edited

Legend:

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

    r9173 r9176  
    6969
    7070    # XXX: Signal need properly be a relation of signal_dbm and noice_dbm
    71     signaal = 100 + int(point.attrib['signal_dbm'])
     71    try:
     72      signaal = 100 + int(point.attrib['signal_dbm'])
     73    except KeyError:
     74      print "#ERROR: Point '%s' does not have signal strengh" % point
    7275
    7376    # TODO: This also saves semi-duplicates; multiple entries with the same values, except
Note: See TracChangeset for help on using the changeset viewer.