Skip to content

Commit

Permalink
make _read_version_subdir return parse('0') instead of [0], otherwise…
Browse files Browse the repository at this point in the history
… it cannot be meaningfully compared to an actual version
  • Loading branch information
denys-duchier committed Jun 14, 2015
1 parent 4112910 commit d392c3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def _read_version_subdir(self, *args):
if not os.path.exists(join(*args)):
self.buildozer.debug(
'build-tools folder not found {}'.format(join(*args)))
return [0]
return parse("0")
for v in os.listdir(join(*args)):
try:
versions.append(parse(v))
Expand All @@ -333,7 +333,7 @@ def _read_version_subdir(self, *args):
if not versions:
self.buildozer.error(
'Unable to find the latest version for {}'.format(join(*args)))
return [0]
return parse("0")
return max(versions)

def _find_latest_package(self, packages, key):
Expand Down

0 comments on commit d392c3c

Please sign in to comment.