Update install for pip

This commit is contained in:
VirtuBox
2019-10-21 11:37:19 +02:00
parent ef84caeea9
commit 6eceb5ed35
3 changed files with 28 additions and 14 deletions

View File

@@ -2,6 +2,7 @@
import os
import urllib.request
import requests
from cement.core.controller import CementBaseController, expose
@@ -74,8 +75,10 @@ class WOCleanController(CementBaseController):
def clean_opcache(self):
try:
Log.info(self, "Cleaning opcache")
urllib.request.urlopen("https://127.0.0.1:22222/cache"
"/opcache/opgui.php?reset=1").read()
opgui = requests.get(
"https://127.0.0.1:22222/cache/opcache/opgui.php?reset=1")
if opgui.status_code != '200':
Log.warn(self, 'Cleaning opcache failed')
except Exception as e:
Log.debug(self, "{0}".format(e))
Log.debug(self, "Unable hit url, "