Skip to content

Commit

Permalink
Fix black
Browse files Browse the repository at this point in the history
  • Loading branch information
fformica committed Nov 15, 2024
1 parent 604c527 commit e38de97
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions examples/redirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
redirect_https = redirects.create(
domain="source.domain.example.com",
path="/path",
target="https://www.ibm.com/products/ns1-connect"
target="https://www.ibm.com/products/ns1-connect",
)

# an http redirect, http://domain/path -> target, will not hold any certificate for the domain
Expand Down Expand Up @@ -67,11 +67,11 @@
##########

# search; we can also use list() to get all redirects
reds = redirects.searchSource('example.com')
print(reds['total'], len(reds['results']))
reds = redirects.searchSource("example.com")
print(reds["total"], len(reds["results"]))

certs = certificates.search('example.com')
print(certs['total'], len(certs['results']))
certs = certificates.search("example.com")
print(certs["total"], len(certs["results"]))

#################
# READ / UPDATE #
Expand All @@ -93,13 +93,13 @@
##########

# delete redirects
redirects.delete(redirect_https['id'])
redirects.delete(redirect_http['id'])
redirects.delete(redirect_allsettings['id'])
redirects.delete(redirect_https["id"])
redirects.delete(redirect_http["id"])
redirects.delete(redirect_allsettings["id"])

# also revoke certificate;
# note that the domain in redirect_http is the same so the certificate is also the same
certificates.delete(redirect_https["certificate_id"])
certificates.delete(redirect_allsettings["certificate_id"])

api.zones().delete('example.com')
api.zones().delete("example.com")

0 comments on commit e38de97

Please sign in to comment.