Commit d0620ffb authored by Jason R. Coombs's avatar Jason R. Coombs

Merge pull request #528 from s-t-e-v-e-n-k/drop-safe-repr

Drop unused safe_repr function
parents 04d10ff0 f4c7a06c
......@@ -15,17 +15,6 @@ from pkg_resources import (parse_requirements, VersionConflict, parse_version,
WorkingSet)
def safe_repr(obj, short=False):
""" copied from Python2.7"""
try:
result = repr(obj)
except Exception:
result = object.__repr__(obj)
if not short or len(result) < pkg_resources._MAX_LENGTH:
return result
return result[:pkg_resources._MAX_LENGTH] + ' [truncated]...'
class Metadata(pkg_resources.EmptyProvider):
"""Mock object to return metadata as if from an on-disk distribution"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment