Skip to content

Commit 9bce9b5

Browse files
committed
make cleaner args check
1 parent 48ea021 commit 9bce9b5

File tree

1 file changed

+3
-5
lines changed
  • pythonforandroid/bootstraps/common/build

1 file changed

+3
-5
lines changed

pythonforandroid/bootstraps/common/build/build.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,10 @@ def make_package(args):
297297
# Add extra environment variable file into tar-able directory:
298298
env_vars_tarpath = tempfile.mkdtemp(prefix="p4a-extra-env-")
299299
with open(os.path.join(env_vars_tarpath, "p4a_env_vars.txt"), "w") as f:
300-
try:
300+
if hasattr(args, 'window'):
301301
f.write("P4A_IS_WINDOWED=" + str(args.window) + "\n")
302-
if hasattr(args, "orientation"):
303-
f.write("P4A_ORIENTATION=" + str(args.orientation) + "\n")
304-
except AttributeError as e:
305-
print ('kivy is not in the requirements')
302+
if hasattr(args, "orientation"):
303+
f.write("P4A_ORIENTATION=" + str(args.orientation) + "\n")
306304
f.write("P4A_NUMERIC_VERSION=" + str(args.numeric_version) + "\n")
307305
f.write("P4A_MINSDK=" + str(args.min_sdk_version) + "\n")
308306

0 commit comments

Comments
 (0)