projects
/
mussorgsky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f9a854
)
convenience function to check is an string is empty
author
Ivan Frade
<ivan.frade@nokia.com>
Sun, 24 Jan 2010 19:01:43 +0000
(21:01 +0200)
committer
Ivan Frade
<ivan.frade@nokia.com>
Sun, 24 Jan 2010 19:01:43 +0000
(21:01 +0200)
src/utils.py
patch
|
blob
|
history
diff --git
a/src/utils.py
b/src/utils.py
index
ae3a4ad
..
daffb06
100644
(file)
--- 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