Empty string is false
authorLukas Pohlreich <pohlreichlukas@gmail.com>
Sat, 25 Oct 2014 12:39:39 +0000 (14:39 +0200)
committerLukas Pohlreich <pohlreichlukas@gmail.com>
Sat, 25 Oct 2014 12:39:39 +0000 (14:39 +0200)
rainbowstream/util.py

index 81dddfd855e7ea39b32fe8b3058ec27e52a171e4..8a33711ceb7efc98a954a48e4337e02b848bd474 100644 (file)
@@ -28,11 +28,11 @@ def format_prefix(listname = '', keyword = ''):
     formattedPrefix = c['PREFIX']
     owner = '@' + c['original_name']
     place = ''
-    if keyword != '':
+    if keyword:
         place = '/public'
         keyword = '#' + keyword
 
-    if listname != '':
+    if listname:
         owner, place = listname.split('/')
         place = "/" + place