Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
HomeAssistant
Core
Commits
2cf86a35
Unverified
Commit
2cf86a35
authored
5 years ago
by
Paulus Schoutsen
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix account link version check (#28770)
parent
ea0bae2d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
homeassistant/components/cloud/account_link.py
+14
-2
14 additions, 2 deletions
homeassistant/components/cloud/account_link.py
with
14 additions
and
2 deletions
homeassistant/components/cloud/account_link.py
+
14
−
2
View file @
2cf86a35
...
@@ -13,7 +13,6 @@ from .const import DOMAIN
...
@@ -13,7 +13,6 @@ from .const import DOMAIN
DATA_SERVICES
=
"
cloud_account_link_services
"
DATA_SERVICES
=
"
cloud_account_link_services
"
CACHE_TIMEOUT
=
3600
CACHE_TIMEOUT
=
3600
PATCH_VERSION
=
int
(
PATCH_VERSION
.
split
(
"
.
"
)[
0
])
_LOGGER
=
logging
.
getLogger
(
__name__
)
_LOGGER
=
logging
.
getLogger
(
__name__
)
...
@@ -49,7 +48,20 @@ def _is_older(version: str) -> bool:
...
@@ -49,7 +48,20 @@ def _is_older(version: str) -> bool:
except
ValueError
:
except
ValueError
:
return
False
return
False
cur_version_parts
=
[
MAJOR_VERSION
,
MINOR_VERSION
,
PATCH_VERSION
]
patch_number_str
=
""
for
char
in
PATCH_VERSION
:
if
char
.
isnumeric
():
patch_number_str
+=
char
else
:
break
try
:
patch_number
=
int
(
patch_number_str
)
except
ValueError
:
patch_number
=
0
cur_version_parts
=
[
MAJOR_VERSION
,
MINOR_VERSION
,
patch_number
]
return
version_parts
<=
cur_version_parts
return
version_parts
<=
cur_version_parts
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment