mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-03-13 04:11:07 +00:00
Python 3.2 workaround: Drop usage of enum module
enum is not yet available in Python 3.2, but as long as snakefruit still runs Ubuntu 12.04 we need to get along without it.
This commit is contained in:
parent
c5c9c6f979
commit
7c6fd99417
@ -1576,9 +1576,9 @@ class Britney(object):
|
||||
for policy in self.policies:
|
||||
if suite in policy.applicable_suites:
|
||||
v = policy.apply_policy(policy_info, suite, src, source_t, source_u, excuse)
|
||||
if v.value > policy_verdict.value:
|
||||
if v > policy_verdict:
|
||||
policy_verdict = v
|
||||
if policy_verdict.is_rejected:
|
||||
if policy_verdict in [PolicyVerdict.REJECTED_PERMANENTLY, PolicyVerdict.REJECTED_TEMPORARILY]:
|
||||
excuse.is_valid = False
|
||||
|
||||
if suite in ('pu', 'tpu') and source_t:
|
||||
|
@ -2,7 +2,6 @@ import json
|
||||
import os
|
||||
import time
|
||||
from abc import abstractmethod
|
||||
from enum import Enum, unique
|
||||
from urllib.parse import quote
|
||||
|
||||
import apt_pkg
|
||||
@ -11,8 +10,7 @@ from britney2.hints import Hint, split_into_one_hint_per_package
|
||||
from britney2.utils import ensuredir
|
||||
|
||||
|
||||
@unique
|
||||
class PolicyVerdict(Enum):
|
||||
class PolicyVerdict:
|
||||
""""""
|
||||
"""
|
||||
The migration item passed the policy.
|
||||
@ -612,7 +610,7 @@ class PiupartsPolicy(BasePolicy):
|
||||
piuparts_info['piuparts-test-url'] = url
|
||||
excuse.addhtml(msg)
|
||||
|
||||
if result.is_rejected:
|
||||
if result in [PolicyVerdict.REJECTED_PERMANENTLY, PolicyVerdict.REJECTED_TEMPORARILY]:
|
||||
for ignore_hint in self.hints.search('ignore-piuparts',
|
||||
package=source_name,
|
||||
version=source_data_srcdist.version):
|
||||
|
Loading…
x
Reference in New Issue
Block a user