#4066 fix errors in channel policy
Merged 2 years ago by tkopecek. Opened 2 years ago by mikem.

file modified
+5 -1
@@ -135,8 +135,12 @@ 

              field = self.field

          if field not in data:

              return False

+         value = data[field]

+         if value is None:

+             # None does not match any pattern

+             return False

          for pattern in args:

-             if fnmatch.fnmatch(data[field], pattern):

+             if fnmatch.fnmatch(value, pattern):

                  return True

          return False

  

file modified
+2 -1
@@ -10150,7 +10150,8 @@ 

                  target = tinfo['name']

          policy_data['target'] = target

  

-     t_opts = params.get('opts', {})

+     # we may have param['opts'] that is explicitly None

+     t_opts = params.get('opts') or {}

      policy_data['scratch'] = t_opts.get('scratch', False)

  

      return policy_data

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

2 years ago

Metadata Update from @relias-redhat:
- Pull-request tagged with: testing-done

2 years ago

Commit e5ec3da fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago