Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Commit af4602b

Browse files
committed
google-assistant-sdk: sync hotword sample
Change-Id: I2b62c8c1adca24599ef638af5a7d6c1be4b6b80c
1 parent d5091b0 commit af4602b

File tree

1 file changed

+13
-5
lines changed
  • google-assistant-sdk/googlesamples/assistant/library

1 file changed

+13
-5
lines changed

google-assistant-sdk/googlesamples/assistant/library/hotword.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def process_device_actions(event, device_id):
4141
if device['id'] == device_id:
4242
if 'execution' in c:
4343
for e in c['execution']:
44-
if e['params']:
44+
if 'params' in e:
4545
yield e['command'], e['params']
4646
else:
4747
yield e['command'], None
@@ -114,10 +114,18 @@ def main():
114114
parser.add_argument('--device_model_id', type=str,
115115
metavar='DEVICE_MODEL_ID', required=True,
116116
help='The device model ID registered with Google')
117-
parser.add_argument('--project_id', type=str,
118-
metavar='PROJECT_ID', required=False,
119-
help=('The project ID used to register'
120-
'device instances'))
117+
parser.add_argument(
118+
'--project_id',
119+
type=str,
120+
metavar='PROJECT_ID',
121+
required=False,
122+
help='The project ID used to register device instances.')
123+
parser.add_argument(
124+
'-v',
125+
'--version',
126+
action='version',
127+
version='%(prog)s ' +
128+
Assistant.__version_str__())
121129

122130
args = parser.parse_args()
123131
with open(args.credentials, 'r') as f:

0 commit comments

Comments
 (0)