use max() instead of sort() + [-1]
This commit is contained in:
parent
e4a4d2ad1b
commit
12964f488f
1 changed files with 2 additions and 4 deletions
|
@ -333,8 +333,7 @@ class TargetAndroid(Target):
|
|||
self.buildozer.error(
|
||||
'Unable to find the latest version for {}'.format(join(*args)))
|
||||
return [0]
|
||||
versions.sort()
|
||||
return versions[-1]
|
||||
return max(versions)
|
||||
|
||||
def _find_latest_package(self, packages, key):
|
||||
package_versions = []
|
||||
|
@ -346,8 +345,7 @@ class TargetAndroid(Target):
|
|||
package_versions.append(version)
|
||||
if not package_versions:
|
||||
return
|
||||
package_versions.sort()
|
||||
return package_versions[-1]
|
||||
return max(package_versions)
|
||||
|
||||
def _install_android_packages(self):
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue