changeset 8:5ed239235b69

speechMusic: don't fail on missing 'name' attr Ignore-this: c82dc82c03e26497136e040a3d87a87f
author drewp@bigasterisk.com
date Sun, 14 Aug 2011 22:41:38 -0700
parents dc03f39f46d9
children d5676c7addd6
files service/speechMusic/speechMusic.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/service/speechMusic/speechMusic.py	Sun Aug 14 22:41:20 2011 -0700
+++ b/service/speechMusic/speechMusic.py	Sun Aug 14 22:41:38 2011 -0700
@@ -65,7 +65,9 @@
 class visitorNet(object):
     def POST(self):
         data = jsonlib.loads(web.data())
-
+        if 'name' not in data:
+            data['name'] = 'unknown'
+            
         if data.get('action') == 'arrive':
             
             snd = ('/my/music/entrance/%s.wav' %