various png-related problems fixed (#311)

This commit is contained in:
Igor Chubin
2019-07-07 18:39:53 +02:00
parent 0df65139e3
commit 040b9ea7d7
3 changed files with 18 additions and 27 deletions

View File

@ -225,17 +225,10 @@ def location_processing(location, ip_addr):
query_source_location = get_location(ip_addr)
country = None
if location is None or location == 'MyLocation':
location, country = query_source_location
if not location or location == 'MyLocation':
location = ip_addr
# Let us try to use geolocation services for locations
# that were derived from IPs.
if location:
location = '~' + location
if country:
location += ", %s" % country
hide_full_address = not force_show_full_address
elif is_ip(location):
if is_ip(location):
location, country = get_location(location)
# here too