Commit 26847e3 [cli] #280 cli upload to nonexisting project makes terminal cursor disappear

1 file Authored and Committed by clime 3 months ago
[cli] #280 cli upload to nonexisting project makes terminal cursor disappear

    
 1 @@ -105,8 +105,8 @@
 2   
 3       def _watch_builds(self, build_ids):
 4           """
 5 -          :param build_ids: list of build IDs
 6 -          """
 7 +         :param build_ids: list of build IDs
 8 +         """
 9           print("Watching build(s): (this may be safely interrupted)")
10   
11           prevstatus = defaultdict(lambda: None)
12 @@ -297,10 +297,13 @@
13       def process_build(self, args, build_function, data, bar=None):
14           username, copr = parse_name(args.copr)
15   
16 -         result = build_function(username=username, projectname=copr, chroots=args.chroots, memory=args.memory,
17 -                                 timeout=args.timeout, background=args.background, **data)
18 -         if bar:
19 -             bar.finish()
20 +         try:
21 +             result = build_function(username=username, projectname=copr, chroots=args.chroots, memory=args.memory,
22 +                                     timeout=args.timeout, background=args.background, **data)
23 +         except:
24 +             if bar:
25 +                 bar.finish()
26 +             raise
27   
28           if result.output != "ok":
29               sys.stderr.write(result.error + "\n")