Skip to content

Commit

Permalink
removed unnecessary brackets and lists
Browse files Browse the repository at this point in the history
  • Loading branch information
ihamburglar committed Apr 29, 2015
1 parent a6d16be commit 473fe6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/certgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def createCertRequest(pkey, digest="sha256", **name):
req = crypto.X509Req()
subj = req.get_subject()

for (key,value) in list(name.items()):
for key,value in name.items():
setattr(subj, key, value)

req.set_pubkey(pkey)
Expand All @@ -67,8 +67,8 @@ def createCertificate(req, issuerCertKey, serial, validityPeriod, digest="sha256
digest - Digest method to use for signing, default is sha256
Returns: The signed certificate in an X509 object
"""
(issuerCert, issuerKey) = issuerCertKey
(notBefore, notAfter) = validityPeriod
issuerCert, issuerKey = issuerCertKey
notBefore, notAfter = validityPeriod
cert = crypto.X509()
cert.set_serial_number(serial)
cert.gmtime_adj_notBefore(notBefore)
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ def dropClient(cli, errors=None):
if writers[cli] == '':
del writers[cli]

for cli in list(clients.keys()):
for cli in clients.keys():
cli.close()
server.close()

0 comments on commit 473fe6a

Please sign in to comment.