Преглед изворни кода

bin/tau-python: [WIP] show task title on creation

Dastan-glitch пре 2 година
родитељ
комит
856ab6cf0a
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      bin/tau/tau-python/main.py

+ 2 - 3
bin/tau/tau-python/main.py

@@ -55,8 +55,8 @@ async def add_task(task_args):
         print("Abort adding the task due to empty description.")
         print("Abort adding the task due to empty description.")
         exit(-1)
         exit(-1)
 
 
-    id = await api.add_task(task)
-    print(f"Created task {id}.")
+    if await api.add_task(task):
+        print(f"Created task '{title}'.")
 
 
 def prompt_text(comment_lines):
 def prompt_text(comment_lines):
     temp = tempfile.NamedTemporaryFile()
     temp = tempfile.NamedTemporaryFile()
@@ -98,7 +98,6 @@ def prompt_comment_text():
 def set_task_attr(task, attr, val):
 def set_task_attr(task, attr, val):
     # templ = lib.util.task_template
     # templ = lib.util.task_template
     assert attr in ["desc", "rank", "due", "project"]
     assert attr in ["desc", "rank", "due", "project"]
-    print(attr)
     # assert templ[attr] != list
     # assert templ[attr] != list
 
 
     if val.lower() == "none":
     if val.lower() == "none":