resolve some Code Style Problems

This commit is contained in:
Bastian Schroll 2016-11-20 13:05:24 +01:00
parent 1877c7f367
commit e3b3377f9e
4 changed files with 22 additions and 22 deletions

View file

@ -15,7 +15,7 @@ import logging
import time
def curtime(format="%d.%m.%Y %H:%M:%S", timestamp=""):
def curtime(timeStr="%d.%m.%Y %H:%M:%S", timestamp=""):
"""
Returns formated date and/or time
see: https://docs.python.org/2/library/time.html#time.strftime
@ -30,9 +30,9 @@ def curtime(format="%d.%m.%Y %H:%M:%S", timestamp=""):
"""
try:
if timestamp == "":
return time.strftime(format)
return time.strftime(timeStr)
else:
return time.strftime(format, time.localtime(timestamp))
return time.strftime(timeStr, time.localtime(timestamp))
except:
logging.warning("error in time-format-string")
logging.debug("error in time-format-string", exc_info=True)