Explorar el Código

删除无关代码

becivells hace 5 años
padre
commit
8a3b05861b
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 2 1
      config.py
  2. 1 2
      webhooks.py

+ 2 - 1
config.py

@@ -35,7 +35,8 @@ PATH_WHITE_LIST = [
     '^/app/web/.*',
     # /app/web/tests
     '^/var/www/html/.*',
-    '/www/wwwroot/.*'
+    '/www/wwwroot/.*',
+    "C:/wwwroot/.*"
 ]
 
 SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess@qwea31ws'

+ 1 - 2
webhooks.py

@@ -85,9 +85,8 @@ def sync(token):
     if not allow_path(path):
         return 'The path is not allow access',403
     # 执行命令
-    tmp = runcmd(cmd, path) + '\n\n'
+    tmp = runcmd(cmd, path)
     # 更改权限
-    tmp += runcmd('chown -R {user}:{user} *'.format(user=user), path)
     #显示结果
     showchar ='name: {name}\nsyndir is: {syndir}\n\n{tmp}\n'.format(
         name=name,syndir=syndir,tmp=tmp)