Skip to content

Commit df02723

Browse files
docs(app.py): fixed style issues reported by black
1 parent be354c9 commit df02723

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

docs/app.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@
1414
print("---- SESSIONLESS COMMUNICATION ----")
1515
cl = AC()
1616
cl.useOTESystem()
17-
cl.setCredentials('test.user', 'test.passw0rd')
17+
cl.setCredentials("test.user", "test.passw0rd")
1818
# use the below method in case you have an active
1919
# ip filter setting
20-
cl.setRemoteIPAddress('1.2.3.4')
20+
cl.setRemoteIPAddress("1.2.3.4")
2121

2222
# Call a command
23-
r = cl.request({
24-
'Command': "QueryDomainList", 'limit': 5
25-
})
23+
r = cl.request({"Command": "QueryDomainList", "limit": 5})
2624

2725
# Get the result in the format you want
2826
rlist = r.getListHash()
@@ -49,23 +47,21 @@
4947
print("---- SESSION-BASED COMMUNICATION ----")
5048
cl = AC()
5149
cl.useOTESystem()
52-
cl.setCredentials('test.user', 'test.passw0rd')
53-
cl.setRemoteIPAddress('1.2.3.4')
50+
cl.setCredentials("test.user", "test.passw0rd")
51+
cl.setRemoteIPAddress("1.2.3.4")
5452

5553
# Call a command
5654
r = cl.login()
5755
# cl.login('12345678'); -> 2FA: one time password
5856

59-
if (r.isSuccess()):
57+
if r.isSuccess():
6058
print("LOGIN SUCCEEDED!")
61-
r = cl.request({
62-
'Command': "QueryDomainList", 'limit': 5
63-
})
59+
r = cl.request({"Command": "QueryDomainList", "limit": 5})
6460
rplain = r.getPlain()
6561
code = r.getCode()
6662
description = r.getDescription()
6763
print(str(code) + " " + description)
6864
# ... further commands ...
6965
r = cl.logout()
70-
if (r.isSuccess()):
66+
if r.isSuccess():
7167
print("LOGOUT SUCCEEDED!")

0 commit comments

Comments
 (0)