Skip to content

resolve n/a returns from geolite2#2

Merged
blacktwin merged 1 commit intomasterfrom
blacktwin-patch-1
Jul 21, 2017
Merged

resolve n/a returns from geolite2#2
blacktwin merged 1 commit intomasterfrom
blacktwin-patch-1

Conversation

@blacktwin
Copy link
Copy Markdown
Owner

Passing on errors in get_geoip_info function instead of returning it.

Changing the get_geo_dict function's exception to catch and return culprit.

    except AttributeError:
        print('User: {} IP: {} caused error in geo_dict.'.format(a.friendly_name, a.ip_address))
        pass
    except Exception as e:
        print(e)
        pass
    return geo_dict

Passing on errors in get_geoip_info function instead of [returning it](https://github.com/blacktwin/JBOPS/blob/master/maps/ips_to_maps.py#L151).

Changing the [get_geo_dict function's exception](https://github.com/blacktwin/JBOPS/blob/master/maps/ips_to_maps.py#L195-L198) to catch and return culprit.

```python
    except AttributeError:
        print('User: {} IP: {} caused error in geo_dict.'.format(a.friendly_name, a.ip_address))
        pass
    except Exception as e:
        print(e)
        pass
    return geo_dict
```
@blacktwin blacktwin merged commit adbc613 into master Jul 21, 2017
@blacktwin blacktwin deleted the blacktwin-patch-1 branch July 21, 2017 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant