Skip to content

Commit

Permalink
Don't fail on epsg.io failure
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Oct 1, 2019
1 parent 6a15ecb commit 529f20d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions geoportal/c2cgeoportal_geoportal/scaffolds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ def _epsg2bbox(srid):
return [r1["x"], r2["y"], r2["x"], r1["y"]]
except requests.RequestException:
print("Failed to establish a connexion to epsg.io.")
return None
except json.JSONDecodeError:
print("epsg.io doesn't return a correct json.")
return None
except IndexError:
print("Unable to get the bbox")
return None
except Exception as exception:
print('unexpected error: {}'.format(str(exception)))
return None


def fix_executables(output_dir, patterns, in_const_create_template=False):
Expand Down

0 comments on commit 529f20d

Please sign in to comment.