Update util.py

Change so there is no blind except.
This commit is contained in:
Hiltronix 2019-08-20 11:04:09 -05:00
parent da3e2391f7
commit 39e45f353f
1 changed files with 2 additions and 3 deletions

View File

@ -1009,10 +1009,9 @@ def get_first_line(s):
Returns only the first line of a string, stripped so
that it doesn't have whitespace before or after.
"""
try:
if s:
return s.strip().split('\n')[0].strip()
except:
return ''
return ''
def object_string_formatter(s, **kwargs):