Skip to content

Commit

Permalink
Replace bin in test_mixed_ownership.py
Browse files Browse the repository at this point in the history
Also, creating a mock file to improve code cleanup of the test_mixed_ownership.py file. Some necessary changes are made to the pkg.py file.
  • Loading branch information
i12momal committed Jul 24, 2024
1 parent efe7e99 commit edf1a3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rpmlint/pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,14 +877,15 @@ def create_files(self, files):
self._mock_file(path, file)

def add_dir(self, path, metadata=None):
pkgdir = PkgFile(path)
name = path
pkgdir = PkgFile(name)
pkgdir.magic = 'directory'

path = os.path.join(self.dir_name(), path.lstrip('/'))
os.makedirs(Path(path), exist_ok=True)

pkgdir.path = path
self.files[path] = pkgdir
self.files[name] = pkgdir

if metadata:
for k, v in metadata.items():
Expand Down

0 comments on commit edf1a3e

Please sign in to comment.