Skip invalid name as version in build-tools directory.(ex: .DS_Store)
This commit is contained in:
parent
7a6034a75e
commit
fdc2bb59ca
1 changed files with 10 additions and 6 deletions
|
@ -320,15 +320,19 @@ class TargetAndroid(Target):
|
|||
return '{}-{}'.format(package_name, version_string)
|
||||
|
||||
def _read_version_subdir(self, *args):
|
||||
versions = []
|
||||
for v in os.listdir(join(*args)):
|
||||
try:
|
||||
versions = [self._process_version_string(v) for v in
|
||||
os.listdir(join(*args))]
|
||||
versions.sort()
|
||||
return versions[-1]
|
||||
print(os.listdir(join(*args)))
|
||||
versions.append(self._process_version_string(v))
|
||||
except:
|
||||
pass
|
||||
if not versions:
|
||||
self.buildozer.error(
|
||||
'Unable to find the latest version for {}'.format(join(*args)))
|
||||
return [0]
|
||||
versions.sort()
|
||||
return versions[-1]
|
||||
|
||||
def _find_latest_package(self, packages, key):
|
||||
package_versions = []
|
||||
|
|
Loading…
Reference in a new issue