Compare commits
2 commits
7d8b38e627
...
4689af2050
| Author | SHA1 | Date | |
|---|---|---|---|
| 4689af2050 | |||
| 7ea1f38a0f |
2 changed files with 4 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ class Worker(ConsumerMixin):
|
|||
|
||||
def process_task(self, body, message):
|
||||
try:
|
||||
if body['task'] == 'trigger_event':
|
||||
if isinstance(body, dict) and body.get('task') == 'trigger_event':
|
||||
daemon.trigger_event(*body['args'])
|
||||
except:
|
||||
logger.error('faild to trigger event %s', body, exc_info=True)
|
||||
|
|
|
|||
|
|
@ -2659,8 +2659,9 @@ pandora.openURL = function(url) {
|
|||
};
|
||||
|
||||
pandora.safeDocumentName = function(name) {
|
||||
['?', '#', '%'].forEach(function(c) {
|
||||
name = name.replace(c, '_');
|
||||
['\\?', '#', '%', '/'].forEach(function(c) {
|
||||
var r = new RegExp(c, 'g')
|
||||
name = name.replace(r, '_');
|
||||
})
|
||||
return name;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue