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 7d5b06c commit 69ee087
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
Expand Up @@ -266,7 +266,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 @@ -332,7 +332,7 @@ def set_geofence_invalidate_cache():
logger.warning("Could not Invalidate GeoFence Rules.")
return False
return True
except Exception:
except BaseException:
tb = traceback.format_exc()
logger.debug(tb)
return False
Expand Down Expand Up @@ -360,7 +360,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 @@ -416,7 +416,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 @@ -502,7 +502,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
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 69ee087

Please sign in to comment.