mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-04-04 14:07:25 +00:00
resolve some Code Style Problems
This commit is contained in:
parent
1877c7f367
commit
e3b3377f9e
4 changed files with 22 additions and 22 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue