1. Shinya Okano
  2. django-skypehub

Commits

Shinya Okano  committed 201cb77

設定方法を変更

  • Participants
  • Parent commits 21ad0f0
  • Branches default

Comments (0)

Files changed (2)

File skypehub/management/commands/runskypebot.py

View file
 from django.core.management import BaseCommand
 from django.utils.daemonize import become_daemon
 
-from skypehub.utils import get_skype
+from skypehub.utils import get_skype, SKYPE_HOOK_OPTIONS
 from skypehub.models import Message
 
 class SkypeEventHandler(object):
     help = "run skype bot."
 
     def handle(self, *args, **options):
-        skype_options = getattr(settings, 'SKYPE_HOOK_OPTIONS', {})
+        skype_options = getattr(settings, 'SKYPE_HOOK_OPTIONS', SKYPE_HOOK_OPTIONS)
         skype = get_skype(**skype_options)
 
         # --daemonize

File skypehub/utils.py

View file
 }
 
 def get_skype(**kwargs):
-    options = kwargs or SKYPE_HOOK_OPTIONS
+    options = kwargs or {}
     return Skype4Py.Skype(**options)