X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Futils.py;h=daffb06ca595217c62a11456fcaf2d1e626dcf14;hb=e6a693eec03ad6a29a6b81f47003e77147704a1b;hp=ae3a4ad9298c860ef62a3b89abf9f1558f37b167;hpb=eebd42af57a711a1e2074a53794306b24bd53b02;p=mussorgsky diff --git a/src/utils.py b/src/utils.py index ae3a4ad..daffb06 100644 --- a/src/utils.py +++ b/src/utils.py @@ -8,6 +8,8 @@ def escape_html (text, max_length=40): text = text [0:cutpoint] + "..." return gobject.markup_escape_text (text) +def is_empty (text): + return not text or len (text.strip ()) == 0 # Set socket timeout import socket