Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 96fb80b

Browse files
cipherboyDirectXMan12
authored andcommitted
OIDs: Add dotted_form properties
This introduces a new property, dotted_form, for querying the dotted form of the OID. Signed-off-by: Alexander Scheel <ascheel@redhat.com>
1 parent 3ac0b2a commit 96fb80b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎gssapi/raw/oids.pyx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,12 @@ cdef class OID:
156156
pos += 1
157157
return decoded
158158

159+
@property
160+
def dotted_form(self):
161+
return '.'.join(str(x) for x in self._decode_asn1ber())
162+
159163
def __repr__(self):
160-
dotted_oid = '.'.join(str(x) for x in self._decode_asn1ber())
161-
return "<OID {0}>".format(dotted_oid)
164+
return "<OID {0}>".format(self.dotted_form)
162165

163166
def __hash__(self):
164167
return hash(self.__bytes__())

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /