Skip to content
Snippets Groups Projects
Commit 3246e3d4 authored by Markus Willman's avatar Markus Willman
Browse files

rename argument for truncateString, avoid collision with internal names

parent 23660f6c
No related branches found
No related tags found
No related merge requests found
...@@ -11,12 +11,12 @@ from dateutil.tz import tzlocal ...@@ -11,12 +11,12 @@ from dateutil.tz import tzlocal
_database = PostgresqlDatabase('stop', user='stop', password='PT52lRecp4NBKQrZT9', host='database') _database = PostgresqlDatabase('stop', user='stop', password='PT52lRecp4NBKQrZT9', host='database')
# Helper functions # Helper functions
def truncateString(str, size): def truncateString(value, size):
strLen = len(str) valLen = len(value)
if size <= 3 or strLen <= 3: if size <= 3 or valLen <= 3:
return str return value
return (str[:(size-3)] + '...') if strLen > size else str return (value[:(size-3)] + '...') if valLen > size else value
# NOTE: most docker images run in UTC by default # NOTE: most docker images run in UTC by default
def currentTime(format = None): def currentTime(format = None):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment