Skip to content

Commit

Permalink
zhars/rm_connector_var_from_python_examples (#467)
Browse files Browse the repository at this point in the history
removed acra-connector related variable from python examples
  • Loading branch information
Zhaars authored Dec 1, 2021
1 parent 2a7d86f commit c943d92
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions examples/python/example_with_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_zone():
"""make http response to AcraServer api to generate new zone and return tuple
of zone id and public key
"""
response = urlopen('{}/getNewZone'.format(ACRA_CONNECTOR_API_ADDRESS))
response = urlopen('{}/getNewZone'.format(ACRA_SERVER_API_ADDRESS))
json_data = response.read().decode('utf-8')
zone_data = json.loads(json_data)
return zone_data['id'], b64decode(zone_data['public_key'])
Expand Down Expand Up @@ -129,8 +129,8 @@ def write_data(data, connection):
help="Use mysql driver")
args = parser.parse_args()

ACRA_CONNECTOR_API_ADDRESS = get_default(
'acra_connector_api_address', 'http://127.0.0.1:9191')
ACRA_SERVER_API_ADDRESS = get_default(
'acra_server_api_address', 'http://127.0.0.1:9191')
# default driver
driver = 'postgresql'
ssl_args = {
Expand Down
6 changes: 3 additions & 3 deletions examples/python/extended_example_with_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_zone():
"""make http response to AcraServer api to generate new zone and return tuple
of zone id and public key
"""
response = urlopen('{}/getNewZone'.format(ACRA_CONNECTOR_API_ADDRESS))
response = urlopen('{}/getNewZone'.format(ACRA_SERVER_API_ADDRESS))
json_data = response.read().decode('utf-8')
zone_data = json.loads(json_data)
return zone_data['id'], zone_data['public_key']
Expand Down Expand Up @@ -162,8 +162,8 @@ def write_data(data, connection):

args = parser.parse_args()

ACRA_CONNECTOR_API_ADDRESS = get_default(
'acra_connector_api_address', 'http://127.0.0.1:9191')
ACRA_SERVER_API_ADDRESS = get_default(
'acra_server_api_address', 'http://127.0.0.1:9191')
# default driver
driver = 'postgresql'
ssl_args = {
Expand Down

0 comments on commit c943d92

Please sign in to comment.