Browse Source

增加打印

Ansjer_antony_ios 3 years ago
parent
commit
33ac0586af
1 changed files with 10 additions and 3 deletions
  1. 10 3
      Controller/OTAEquipment.py

+ 10 - 3
Controller/OTAEquipment.py

@@ -3,6 +3,8 @@ import os
 import simplejson as json
 import time
 import traceback
+import logging
+
 from wsgiref.util import FileWrapper
 from zlib import crc32
 
@@ -673,8 +675,11 @@ def downloadOTAInterfaceV2(request, fullPath, *callback_args, **callback_kwargs)
     old_version = url_token.old_version
     new_version = url_token.new_version
 
-    if ('' == fp):
-        print('过期了')
+    logger = logging.getLogger('info')
+
+    if '' == fp:
+        # print('过期了')
+        logger.info('过期了')
         return res.json(907)
     else:
         print('URL参数%s-%s-%s-%s-%s-', (url_token.Url,url_token.serial_number,url_token.uid,url_token.user_id,url_token.eid))
@@ -706,11 +711,13 @@ def downloadOTAInterfaceV2(request, fullPath, *callback_args, **callback_kwargs)
                     uid=uid,
                     mci=mci,
                 )
-
+                logger.info('记录成功')
                 return response
             except Exception as e:
+                logger.info('下载中断')
                 return res.json(906, repr(e))
         else:
+            logger.info('过期了--2')
             return res.json(907)
     else:
         return res.json(444, 'fullPath')