Procházet zdrojové kódy

tau: prevent empty comments on tasks

dasman před 2 roky
rodič
revize
77533a5312
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  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