Просмотр исходного кода

tau: prevent empty comments on tasks

dasman 2 лет назад
Родитель
Сommit
77533a5312
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      bin/tau/tau-python/tau

+ 4 - 0
bin/tau/tau-python/tau

@@ -432,6 +432,10 @@ async def comment(refid, args, server_name, port):
     else:
         comment = " ".join(args)
 
+    if comment.strip() == '':
+        print("Abort adding comment due to empty content.")
+        exit(-1)
+
     if not await api.add_task_comment(refid, comment, server_name, port):
         return -1