Nicholas Jones 747480367b Enable pep8 checks
Enables excluded pep8 checks and fixes existing the related errors

Change-Id: Ib3a909d79b9726567c1cebf5881d1878d91ee052
2017-08-01 09:49:28 -05:00

17 lines
519 B
Python
Executable File

from pecan import conf, request
import time
def convert_time_human(time_stamp):
return time.ctime(int(time_stamp))
def get_server_links(id=None):
links = {'self': '{}'.format(request.url)}
self_links = '{}'.format(request.upath_info)
if id and id not in request.path:
links['self'] += '{}{}'.format('' if request.path[-1] == '/' else '/',
id)
self_links += '{}{}'.format('' if request.path[-1] == '/' else '/', id)
return links, self_links