Skip to content

Commit fe1ff50

Browse files
committed
Undo unnecessary changes.
1 parent 8538dd7 commit fe1ff50

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pythonforandroid/recipes/android/src/android/broadcast.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ def __init__(self, callback, actions=None, categories=None):
3030
def _expand_partial_name(partial_name):
3131
if '.' in partial_name:
3232
return partial_name # Its actually a full dotted name
33-
name = 'ACTION_{}'.format(partial_name.upper())
34-
if not hasattr(Intent, name):
35-
raise Exception('The intent {} does not exist'.format(name))
36-
return getattr(Intent, name)
33+
else:
34+
name = 'ACTION_{}'.format(partial_name.upper())
35+
if not hasattr(Intent, name):
36+
raise Exception('The intent {} does not exist'.format(name))
37+
return getattr(Intent, name)
3738

3839
# resolve actions/categories first
3940
Intent = autoclass('android.content.Intent')

0 commit comments

Comments
 (0)