Skip to content

Commit

Permalink
pipfile fix, minor code quality improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
TKIPisalegacycipher committed Jul 16, 2024
1 parent 98f38f6 commit c3fa44a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ setuptools = "~=70.0.0"
[dev-packages]

[requires]
python_version = "3.10"
python_version = ">=3.10, <4.0"
4 changes: 2 additions & 2 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions examples/camera_boundary_ranges_example.py

This file was deleted.

4 changes: 3 additions & 1 deletion examples/wireless_rf_profiles_overview.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import meraki

### work in progress

print(
f"To use this tool, you must supply your organization ID. Your organization ID should be an integer."
)
organization_id = "102908"
organization_id = ""
# organization_id = input(f"Enter your organization ID:")

all_rf_profiles = list()
Expand Down
6 changes: 3 additions & 3 deletions meraki/rest_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def request(self, metadata, method, url, **kwargs):
kwargs.setdefault('timeout', self._single_request_timeout)

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

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

# Append that page's results, depending on the endpoint
if type(results) == list:
if isinstance(results, list):
results.extend(response.json())
# For event log endpoint
elif type(results) == dict:
elif isinstance(results, dict):
try:
start = response.json()['pageStartAt']
except KeyError:
Expand Down

0 comments on commit c3fa44a

Please sign in to comment.