Skip to content

Commit

Permalink
Use ByteString field for RootDirectory
Browse files Browse the repository at this point in the history
A root_scanner unit test for non-utf8 filename has
been added as well.

OAMG-4306
Depends-On: oamg/leapp#789
  • Loading branch information
fernflower committed Jul 29, 2022
1 parent 7b570ed commit cc2a502
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
({'bin': '/usr/bin'}, True),
({'sbin': 'usr/bin'}, False),
({'sbin': '/usr/sbin'}, True),
({'lib': '/usr/lib', 'lib64': 'usr/lib64'}, True)])
({'lib': '/usr/lib', 'lib64': 'usr/lib64'}, True),
({b'\xc4\xc9\xd2\xc5\xcb\xd4\xcf\xd2\xc9\xd1': ''}, False)])
def test_wrong_symlink_inhibitor(current_actor_context, modified, expected_report):
subdirs = {
'bin': 'usr/bin',
Expand Down
4 changes: 2 additions & 2 deletions repos/system_upgrade/common/models/rootdirectory.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from leapp.models import Model, fields
from leapp.models import fields, Model
from leapp.topics import SystemFactsTopic


Expand All @@ -7,7 +7,7 @@ class RootSubdirectory(Model):
Representation of a single root subdirectory. Can be expanded as needed.
"""
topic = SystemFactsTopic
name = fields.String()
name = fields.ByteString()
target = fields.Nullable(fields.String()) # if it's a link


Expand Down

0 comments on commit cc2a502

Please sign in to comment.