diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-03-22 23:24:58 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-03-22 23:24:58 -0500 |
commit | 58b756969211e2972fb6fda44582e55b98c02924 (patch) | |
tree | 9be2079608a0755f2590d199a479ef9906b5c0b9 /src | |
parent | 611d3d36fb1e33582eefc81cc241140d7a69f733 (diff) | |
download | cryptography-58b756969211e2972fb6fda44582e55b98c02924.tar.gz cryptography-58b756969211e2972fb6fda44582e55b98c02924.tar.bz2 cryptography-58b756969211e2972fb6fda44582e55b98c02924.zip |
doc updates and simplification of __repr__
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/x509.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index 4ba6956e..0c773dac 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -164,10 +164,8 @@ class Extension(object): value = utils.read_only_property("_value") def __repr__(self): - return ("<Extension(oid={oid}, " - "critical={critical}, value={value})>").format( - oid=self.oid, critical=self.critical, value=self.value - ) + return ("<Extension(oid={0.oid}, critical={0.critical}, " + "value={0.value})>").format(self) class BasicConstraints(object): @@ -191,10 +189,8 @@ class BasicConstraints(object): path_length = utils.read_only_property("_path_length") def __repr__(self): - return ("<BasicConstraints(ca={ca}, " - "path_length={path_length})>").format( - ca=self.ca, path_length=self.path_length - ) + return ("<BasicConstraints(ca={0.ca}, " + "path_length={0.path_length})>").format(self) OID_COMMON_NAME = ObjectIdentifier("2.5.4.3") |