#112 Fix unlink compose directory
Closed 6 years ago by cqi. Opened 6 years ago by cqi.

@@ -119,7 +119,6 @@ 

          """

          if os.path.realpath(toplevel_dir) != toplevel_dir:

              targetpath = os.path.realpath(toplevel_dir)

-             os.unlink(toplevel_dir)

              shutil.rmtree(targetpath)

  

      def do_work(self):

Signed-off-by: Chenxiong Qi cqi@redhat.com

Found this when run test TestExpireThread.test_expire_done.

Can you describe more why this is removed? I think this is here to remove symlink from "latest-odcs-N" to the "odcs-N.N" directory.

Can you describe more why this is removed? I think this is here to remove symlink from "latest-odcs-N" to the "odcs-N.N" directory.

            targetpath = os.path.realpath(toplevel_dir)
            import pytest; pytest.set_trace()
>           os.unlink(toplevel_dir)
E           OSError: [Errno 21] Is a directory: './latest-odcs-1-1'

It is a directory in my machine.

Hm, is that hardlink? I think it really has to point to that other directory somehow.

Wired. It does not happen now. I'm going to close this pr.

Pull-Request has been closed by cqi

6 years ago
Metadata