@@ -538,6 +538,9 @@ def parse_args(args=None):
538
538
ap .add_argument ('--icon' , dest = 'icon' ,
539
539
help = ('A png file to use as the icon for '
540
540
'the application.' ))
541
+ ap .add_argument ('--service' , dest = 'services' , action = 'append' ,
542
+ help = 'Declare a new service entrypoint: '
543
+ 'NAME:PATH_TO_PY[:foreground]' )
541
544
if get_bootstrap_name () != "service_only" :
542
545
ap .add_argument ('--presplash' , dest = 'presplash' ,
543
546
help = ('A jpeg file to use as a screen while the '
@@ -566,10 +569,6 @@ def parse_args(args=None):
566
569
'https://developer.android.com/guide/'
567
570
'topics/manifest/'
568
571
'activity-element.html' ))
569
- else :
570
- ap .add_argument ('--service' , dest = 'services' , action = 'append' ,
571
- help = 'Declare a new service entrypoint: '
572
- 'NAME:PATH_TO_PY[:foreground]' )
573
572
ap .add_argument ('--wakelock' , dest = 'wakelock' , action = 'store_true' ,
574
573
help = ('Indicate if the application needs the device '
575
574
'to stay on' ))
@@ -689,7 +688,7 @@ def _read_configuration():
689
688
if args .meta_data is None :
690
689
args .meta_data = []
691
690
692
- if getattr ( args , ' services' , None ) is None :
691
+ if args . services is None :
693
692
args .services = []
694
693
695
694
if args .try_system_python_compile :
0 commit comments