Skip to content

Commit

Permalink
correct backquotes and apostrophes
Browse files Browse the repository at this point in the history
  • Loading branch information
andreygrechin committed May 6, 2019
1 parent 05d07ef commit 0ac644a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions umbr_api/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Note:
When posting data to the Security Platform API, the following steps are
taken before the domain appears in a customer`s block list. The optional
taken before the domain appears in a customer's block list. The optional
parameter "disableDstSafeguards" can be used to bypass parts of this
process as outlined in the Generic Event Format Field Descriptions.
The domain acceptance process is outlined from start to finish here:
Expand Down Expand Up @@ -67,7 +67,7 @@ def add(domain=None, url=None, key=None, bypass=False):

if domain != check_url:
logger.warning(
"Domain name part from URL " "doesn`t match DNS domain name"
"Domain name part from URL doesn't match DNS domain name"
)
logger.warning("DNS domain name: %s", domain)
logger.warning("URL domain name: %s", check_url)
Expand Down
4 changes: 2 additions & 2 deletions umbr_api/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ def _read_cfg(default_value=None, filename=None, key_to_read=None):
try:
file = open(json_config_file_name, "r")
except FileNotFoundError as msg:
print("Error: Cannot find `{}`.".format(json_config_file_name))
print("Error: Cannot find '{}'.".format(json_config_file_name))
print("Please provide credentials via json file or the keyring.")
logger.debug(msg)
raise SystemExit(2)
try:
json_data = load(file)
default_value = json_data[key_to_read]
except KeyError as msg:
print("Error: Cannot find data with in `%s`", filename)
print("Error: Cannot find data with in '%s'", filename)
logger.debug(msg)
raise SystemExit(1)
finally:
Expand Down
4 changes: 2 additions & 2 deletions umbr_api/data/umbrella_example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"orgid": "0000000",
"info": "_____Provide credentials as: `key:secret`, separated by colon_____",
"info": "_____Provide credentials as: 'key:secret', separated by colon_____",
"reporting": "YourKeyIsHere:YourSecretIsHere",
"management": "YourKeyIsHere:YourSecretIsHere",
"enforcement": "YOUR-CUSTOMER-KEY-IS-HERE-0123456789"
}
}
6 changes: 3 additions & 3 deletions umbr_api/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
>>> print(response.status_code)
200
`PEP 484` type annotations are supported. If attribute, parameter, and
return types are annotated according to `PEP 484`, they do not need to be
PEP 484 type annotations are supported. If attribute, parameter, and
return types are annotated according to PEP 484, they do not need to be
included in the docstring:
Todo:
Expand Down Expand Up @@ -41,7 +41,7 @@ def get_list(page=1, limit=10, key=None):
Args:
page (int): Page # to request.
limit (int): Limit number of records to request.
key (str): API key, if not specify obtain via `key` module.
key (str): API key, if not specify obtain via ``key`` module.
Returns:
Return ``requests.Response`` object.
Expand Down
6 changes: 3 additions & 3 deletions umbr_api/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def activity(cred=None, orgid=None, **kwargs):
Unix (epoch) timestamp in milliseconds. (not implemented)
Returns:
requests.Response: Return `requests.Response` class object
requests.Response: Return ``requests.Response`` class object
"""
cfg_file = kwargs.get("filename", "umbrella.json")
Expand Down Expand Up @@ -83,7 +83,7 @@ def top_identities(destination, cred=None, orgid=None, **kwargs):
orgid (str): Cisco Umbrella organization ID
Returns:
requests.Response: Return `requests.Response` class object
requests.Response: Return ``requests.Response`` class object
"""
cfg_file = kwargs.get("filename", "umbrella.json")
Expand Down Expand Up @@ -120,7 +120,7 @@ def recent(destination, cred=None, orgid=None, offset=0, **kwargs):
the next fifty after that.
Returns:
requests.Response: Return `requests.Response` class object
requests.Response: Return ``requests.Response`` class object
"""
cfg_file = kwargs.get("filename", "umbrella.json")
Expand Down
4 changes: 2 additions & 2 deletions umbr_api/umbrella.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ def save_key(key, name):
if read_key == key:
print("OK")
else:
print("Error: Provided credentials doesn" "t match to saved.")
logging.error("Provided credentials doesn" "t match to saved key.")
print("Error: Provided credentials doesn't match to saved.")
logging.error("Provided credentials doesn't match to saved key.")
return 0 if read_key == key else 1


Expand Down

0 comments on commit 0ac644a

Please sign in to comment.