Commit 3aa5cf16 authored by Administrator's avatar Administrator
Browse files

Compatibility to python 3.5

parent 76cd4c23
......@@ -1223,7 +1223,7 @@ def make_scheduler():
def uwsgi_timer(signum):
if signum == 0:
check_and_send_reminders()
except ModuleNotFoundError:
except ImportError:
print("uwsgi not found, falling back to apscheduler for cron-like tasks")
def make_scheduler(app, config, function):
scheduler = BackgroundScheduler()
......
......@@ -176,7 +176,6 @@ def check_ip_in_networks(networks_string):
address = ipaddress.ip_address(request.remote_addr)
if address == ipaddress.ip_address("127.0.0.1") and "X-Real-Ip" in request.headers:
address = ipaddress.ip_address(request.headers["X-Real-Ip"])
print(address)
try:
for network_string in networks_string.split(","):
network = ipaddress.ip_network(network_string.strip())
......
......@@ -69,13 +69,11 @@ class IPNetworkField(Field):
def _value(self):
if self.raw_data:
print("raw_data in _value", self.raw_data)
return " ".join(self.raw_data)
else:
return self.data and str(self.data) or ""
def process_formdata(self, valuelist):
print("valuelist in process_formdata", valuelist)
if valuelist:
data_str = valuelist[0]
result_parts = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment