Skip to content

Commit c3fa44a

Browse files
pipfile fix, minor code quality improvements
1 parent 98f38f6 commit c3fa44a

5 files changed

+9
-13
lines changed

Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ setuptools = "~=70.0.0"
1414
[dev-packages]
1515

1616
[requires]
17-
python_version = "3.10"
17+
python_version = ">=3.10, <4.0"

Pipfile.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/camera_boundary_ranges_example.py

-6
This file was deleted.

examples/wireless_rf_profiles_overview.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import meraki
22

3+
### work in progress
4+
35
print(
46
f"To use this tool, you must supply your organization ID. Your organization ID should be an integer."
57
)
6-
organization_id = "102908"
8+
organization_id = ""
79
# organization_id = input(f"Enter your organization ID:")
810

911
all_rf_profiles = list()

meraki/rest_session.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def request(self, metadata, method, url, **kwargs):
153153
kwargs.setdefault('timeout', self._single_request_timeout)
154154

155155
# Ensure proper base URL
156-
allowed_domains = ['meraki.com', 'meraki.cn', 'meraki.in', 'gov-meraki.com']
156+
allowed_domains = ['meraki.com', 'meraki.ca', 'meraki.cn', 'meraki.in', 'gov-meraki.com']
157157
parsed_url = urllib.parse.urlparse(url)
158158

159159
if any(domain in parsed_url.netloc for domain in allowed_domains):
@@ -446,10 +446,10 @@ def _get_pages_legacy(self, metadata, url, params=None, total_pages=-1, directio
446446
break
447447

448448
# Append that page's results, depending on the endpoint
449-
if type(results) == list:
449+
if isinstance(results, list):
450450
results.extend(response.json())
451451
# For event log endpoint
452-
elif type(results) == dict:
452+
elif isinstance(results, dict):
453453
try:
454454
start = response.json()['pageStartAt']
455455
except KeyError:

0 commit comments

Comments
 (0)