mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-04-04 14:07:25 +00:00
resolve some Code Style Problems
This commit is contained in:
parent
1877c7f367
commit
e3b3377f9e
4 changed files with 22 additions and 22 deletions
|
|
@ -11,12 +11,12 @@ Yowsup-Plugin to dispatch POCSAG - messages to WhatsApp Numbers or Chats
|
|||
yowsup-Configuration has to be set in the config.ini
|
||||
"""
|
||||
|
||||
import logging
|
||||
import logging
|
||||
import subprocess
|
||||
import shlex
|
||||
import os
|
||||
|
||||
from includes import globalVars
|
||||
from includes import globalVars
|
||||
|
||||
from includes.helper import timeHandler
|
||||
from includes.helper import wildcardHandler
|
||||
|
|
@ -34,23 +34,23 @@ def run(typ,freq,data):
|
|||
sender = globalVars.config.get("yowsup", "sender")
|
||||
password = globalVars.config.get("yowsup", "password")
|
||||
devnull = open(os.devnull, "wb")
|
||||
|
||||
|
||||
if typ == "FMS":
|
||||
text = globalVars.config.get("yowsup","fms_message")
|
||||
text = wildcardHandler.replaceWildcards(text, data)
|
||||
text = wildcardHandler.replaceWildcards(text, data)
|
||||
cmd = 'yowsup-cli demos -l ' + sender + ':' + password + ' -s ' + empfaenger + ' "' + text + '" -M'
|
||||
subprocess.call(shlex.split(cmd), stdout=devnull, stderr=devnull)
|
||||
logging.debug("Message has been sent")
|
||||
elif typ == "ZVEI":
|
||||
text = globalVars.config.get("yowsup","zvei_message")
|
||||
text = wildcardHandler.replaceWildcards(text, data)
|
||||
text = wildcardHandler.replaceWildcards(text, data)
|
||||
cmd = 'yowsup-cli demos -l ' + sender + ':' + password + ' -s ' + empfaenger + ' "' + text + '" -M'
|
||||
subprocess.call(shlex.split(cmd), stdout=devnull, stderr=devnull)
|
||||
logging.debug("Message has been sent")
|
||||
elif typ == "POC":
|
||||
try:
|
||||
text = globalVars.config.get("yowsup","poc_message")
|
||||
text = wildcardHandler.replaceWildcards(text, data)
|
||||
text = wildcardHandler.replaceWildcards(text, data)
|
||||
cmd = 'yowsup-cli demos -l ' + sender + ':' + password + ' -s ' + empfaenger + ' "' + text + '" -M'
|
||||
subprocess.call(shlex.split(cmd), stdout=devnull, stderr=devnull)
|
||||
logging.debug("Message has been sent")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue