#1105 frontend: fix broken branch-fedora command
Merged 4 years ago by praiskup. Opened 4 years ago by thrnciar.

@@ -1,8 +1,8 @@ 

  import click

  from coprs.logic import coprs_logic

  

- from commands.create_chroot import create_chroot

- from commands.rawhide_to_release import rawhide_to_release

+ from commands.create_chroot import create_chroot_function

+ from commands.rawhide_to_release import rawhide_to_release_function

  

  

  @click.command()
@@ -30,7 +30,7 @@ 

          for rch in rawhide_chroots

      }

  

-     create_chroot(chroot_pairs.keys(), branch, True)

+     create_chroot_function(chroot_pairs.keys(), branch, True)

  

      for new_chroot, rawhide_chroot in chroot_pairs.items():

-         rawhide_to_release(rawhide_chroot, new_chroot)

+         rawhide_to_release_function(rawhide_chroot, new_chroot)

@@ -19,6 +19,9 @@ 

      required=True

  )

  def rawhide_to_release(rawhide_chroot, dest_chroot):

+     return rawhide_to_release_function(rawhide_chroot, dest_chroot)

+ 

+ def rawhide_to_release_function(rawhide_chroot, dest_chroot):

      mock_chroot = coprs_logic.MockChrootsLogic.get_from_name(dest_chroot).first()

      if not mock_chroot:

          print("Given chroot does not exist. Please run:")

I don't think this is correct.

The create_chroot is a <click.core.Command object at 0x7f5b7dcd6990, so it is modified by those decorators somehow. IMHO a better approach would be to use create_chroot_function instead.

rebased onto bc359b3748b26251d50d91ee3adaacdd0b25d859

4 years ago

rebased onto 89c7bb0

4 years ago

Commit 559db8c fixes this pull-request

Pull-Request has been merged by praiskup

4 years ago