aboutsummaryrefslogtreecommitdiffstats
path: root/clients/network_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'clients/network_client.py')
-rw-r--r--clients/network_client.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/clients/network_client.py b/clients/network_client.py
index 87f870e..c45ef8b 100644
--- a/clients/network_client.py
+++ b/clients/network_client.py
@@ -76,6 +76,7 @@ class BBJ(object):
self.send_auth = True
try:
self.user = self("get_me")["data"]
+ self.update_instance_info()
except URLError:
raise URLError("Cannot connect to %s (is the server down?)" % self.base[0:-2])
@@ -178,6 +179,19 @@ class BBJ(object):
raise e
+ def update_instance_info(self):
+ """
+ Stores configuration info for the connected BBJ server.
+
+ {
+ "instance_name": (string), // a title set by the server owner
+ "allow_anon": (bool) // whether anonymous participation is allowed
+ }
+ """
+ response = self("instance_info")
+ self.instance_info = response["data"]
+
+
def validate(self, key, value, exception=AssertionError):
"""
Uses the server's db_validate method to verify the validty
Un proyecto texto-plano.xyz