Skip to content

Commit 1f61321

Browse files
committed
Fix the docstring format according to PEP 257
1 parent b161e98 commit 1f61321

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

ssl-cert-parse.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010

1111
def GetCert(SiteName, Port):
12-
'''Connect to the specified host and get the certificate file'''
12+
"""
13+
Connect to the specified host and get the certificate file
14+
"""
1315
Client = socket.socket()
1416
Client.settimeout(None)
1517
try:
@@ -51,7 +53,9 @@ def GetCertFile(FileName):
5153

5254

5355
def ParseCert(CertRaw):
54-
'''Parse the available data from the certificate file'''
56+
"""
57+
Parse the available data from the certificate file
58+
"""
5559
Cert = OpenSSL.crypto.load_certificate(
5660
OpenSSL.crypto.FILETYPE_PEM, CertRaw)
5761

@@ -73,7 +77,9 @@ def ParseCert(CertRaw):
7377

7478

7579
def ParseCertExtension(CertRaw):
76-
'''Parse the available extension data from the certificate file'''
80+
"""
81+
Parse the available extension data from the certificate file
82+
"""
7783
Cert = OpenSSL.crypto.load_certificate(
7884
OpenSSL.crypto.FILETYPE_PEM, CertRaw)
7985

@@ -95,7 +101,9 @@ def ParseCertExtension(CertRaw):
95101

96102

97103
def PrintOutData(*args):
98-
'''Print out the results of ParseCert() function'''
104+
"""
105+
Print out the results of ParseCert() function
106+
"""
99107
if len(args) == 1:
100108
FileName = args[0]
101109
CertRaw = GetCertFile(FileName)
@@ -123,7 +131,9 @@ def PrintOutData(*args):
123131

124132

125133
def PrintOutExtData(*args):
126-
'''Print out the results of ParseCertExtension() function'''
134+
"""
135+
Print out the results of ParseCertExtension() function
136+
"""
127137
if len(args) == 1:
128138
FileName = args[0]
129139
CertRaw = GetCertFile(FileName)
@@ -139,7 +149,9 @@ def PrintOutExtData(*args):
139149

140150

141151
def PrintOutDataTerse(*args):
142-
'''Print out the results of ParseCert() function'''
152+
"""
153+
Print out the results of ParseCert() function
154+
"""
143155
if len(args) == 1:
144156
FileName = args[0]
145157
CertRaw = GetCertFile(FileName)

0 commit comments

Comments
 (0)