Ver código fonte

fix issue with empty questions

Benjamin Gleitzman 12 anos atrás
pai
commit
bc067026bf
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      howdoi.py

+ 2 - 0
howdoi.py

@@ -71,6 +71,8 @@ def get_instructions(args):
         text = first_answer.find('.post-text').eq(0).text()
     else:
         text = instructions.eq(0).text()
+    if not text:
+        return ''
     text = '> ' + text
     text = text.replace('\n', '\n> ')
     return text