locky 4 년 전
부모
커밋
ffbc3c47e8
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      Controller/AlexaController.py

+ 2 - 1
Controller/AlexaController.py

@@ -26,9 +26,10 @@ class PushCommandView(View):
         if not command:
             return HttpResponse(444)
         try:
+            djangoLogger = logging.getLogger('django')
+            djangoLogger.info('开始调用')
             back = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE). \
                                     communicate(timeout=2)
-            djangoLogger = logging.getLogger('django')
             djangoLogger.info('调用pushtool日志:\n {}'.format(back))
             return HttpResponse(back)
         except Exception as e: