Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove empty except clauses #1696

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 3 additions & 22 deletions buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from shutil import which
from sys import platform, executable
from time import sleep
import traceback

from distutils.version import LooseVersion
import pexpect
Expand Down Expand Up @@ -273,10 +272,7 @@ def archs_snake(self):

def check_requirements(self):
if platform in ('win32', 'cygwin'):
try:
self._set_win32_java_home()
except:
traceback.print_exc()
self._set_win32_java_home()
self.adb_executable = join(self.android_sdk_dir, 'platform-tools',
'adb.exe')
self.javac_cmd = self._locate_java('javac.exe')
Expand Down Expand Up @@ -522,10 +518,7 @@ def _read_version_subdir(self, *args):
*args)))
return parse("0")
for v in os.listdir(join(*args)):
try:
versions.append(parse(v))
except:
pass
versions.append(parse(v))
if not versions:
self.logger.error(
'Unable to find the latest version for {}'.format(join(*args)))
Expand Down Expand Up @@ -1296,14 +1289,6 @@ def build_package(self):

self.execute_build_package(build_cmd)

try:
self.buildozer.hook("android_pre_build_apk")
self.execute_build_package(build_cmd)
self.buildozer.hook("android_post_build_apk")
except:
# maybe the hook fail because the apk is not
pass

build_tools_versions = os.listdir(join(self.android_sdk_dir, "build-tools"))
build_tools_versions = sorted(build_tools_versions, key=LooseVersion)
build_tools_version = build_tools_versions[-1]
Expand Down Expand Up @@ -1391,11 +1376,7 @@ def _update_libraries_references(self, dist_dir):

# recreate the project.properties
with io.open(project_fn, 'w', encoding='utf-8') as fd:

try:
fd.writelines((line.decode('utf-8') for line in content))
except:
fd.writelines(content)
fd.writelines(content)
if content and not content[-1].endswith(u'\n'):
fd.write(u'\n')
for index, ref in enumerate(references):
Expand Down