summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-06-19 17:59:24 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-06-19 17:59:24 (GMT)
commit4f2d096cc69400f17136b0b6fa064a86bb2fb02a (patch)
tree68158f23985442c8e4e82663907076fb7f67e6b0
parent57e5e3cc81751622e66fc228baaad2d38c408cfa (diff)
Skipped empty bio when printing a profile summary.
-rw-r--r--profile.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/profile.py b/profile.py
index e4d772b..38853a7 100644
--- a/profile.py
+++ b/profile.py
@@ -115,8 +115,13 @@ class TinderProfile(object):
while bio[-1] == '\n' or bio[-1] == ' ':
bio = bio[:-1]
- desc += '\n\n'
- desc += ' ' + bio
+ if len(bio) == 0:
+ bio = None
+ break
+
+ if bio:
+ desc += '\n\n'
+ desc += ' ' + bio
return desc