Skip to content

Commit

Permalink
- minor log formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Nov 14, 2018
1 parent 238ca94 commit d2bf71a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions geonode/security/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def purge_geofence_all():
raise e
except Exception:
logger.debug("Response [{}] : {}".format(r.status_code, r.text))
except Exception:
except BaseException:
tb = traceback.format_exc()
logger.debug(tb)

Expand Down Expand Up @@ -321,7 +321,7 @@ def set_geofence_invalidate_cache():

if (r.status_code < 200 or r.status_code > 201):
logger.warning("Could not Invalidate GeoFence Rules.")
except Exception:
except BaseException:
tb = traceback.format_exc()
logger.debug(tb)

Expand All @@ -348,7 +348,7 @@ def set_geowebcache_invalidate_cache(layer_alternate):
auth=HTTPBasicAuth(user, passwd))
if (r.status_code < 200 or r.status_code > 201):
logger.warning("Could not Truncate GWC Cache for Layer '%s'." % layer_alternate)
except Exception:
except BaseException:
tb = traceback.format_exc()
logger.debug(tb)

Expand Down Expand Up @@ -404,7 +404,7 @@ def set_geofence_all(instance):
"Response {!r} : {}".format(response.status_code, response.text))
raise RuntimeError("Could not ADD GeoServer ANONYMOUS Rule "
"for Layer {}".format(resource.layer.name))
except Exception:
except BaseException:
tb = traceback.format_exc()
logger.debug(tb)
finally:
Expand Down Expand Up @@ -484,7 +484,7 @@ def remove_object_permissions(instance):
purge_geofence_layer_rules(resource)
except (ObjectDoesNotExist, RuntimeError):
pass # This layer is not manageable by geofence
except Exception:
except BaseException:
tb = traceback.format_exc()
logger.debug(tb)
finally:
Expand Down
2 changes: 2 additions & 0 deletions geonode/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,8 @@ def fixup_shp_columnnames(inShapefile, charset, tempdir=None):
try:
inDataSource = inDriver.Open(inShapefile, 1)
except BaseException:
tb = traceback.format_exc()
logger.debug(tb)
inDataSource = None
if inDataSource is None:
logger.warning('Could not open %s' % (inShapefile))
Expand Down

0 comments on commit d2bf71a

Please sign in to comment.