diff --git a/oqamaint/cli.py b/oqamaint/cli.py index 7012742e..c048a37f 100644 --- a/oqamaint/cli.py +++ b/oqamaint/cli.py @@ -11,10 +11,10 @@ from openqa_client.client import OpenQA_Client # from package itself import osc -from openqabot import OpenQABot -from opensuse import openSUSEUpdate +from oqamaint.openqabot import OpenQABot +from oqamaint.opensuse import openSUSEUpdate import ReviewBot -from suse import SUSEUpdate +from oqamaint.suse import SUSEUpdate class CommandLineInterface(ReviewBot.CommandLineInterface): diff --git a/oqamaint/openqabot.py b/oqamaint/openqabot.py index 6b9fa042..7f8dc9f0 100644 --- a/oqamaint/openqabot.py +++ b/oqamaint/openqabot.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- +import hashlib from datetime import date -import md5 from pprint import pformat -from urllib2 import HTTPError -from urllib import quote_plus +from urllib.error import HTTPError +from urllib.parse import quote_plus from osclib.comments import CommentAPI import requests @@ -12,7 +12,7 @@ import osc.core import ReviewBot -from suse import SUSEUpdate +from oqamaint.suse import SUSEUpdate try: from xml.etree import cElementTree as ET @@ -91,7 +91,7 @@ class OpenQABot(ReviewBot.ReviewBot): # check a set of repos for their primary checksums @staticmethod def calculate_repo_hash(repos, incidents): - m = md5.new() + m = hashlib.md5() # if you want to force it, increase this number m.update('b') for url in repos: diff --git a/oqamaint/opensuse.py b/oqamaint/opensuse.py index 7780b795..12d03dd1 100644 --- a/oqamaint/opensuse.py +++ b/oqamaint/opensuse.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -from update import Update import re from collections import namedtuple import osc.core +from oqamaint.update import Update try: from xml.etree import cElementTree as ET diff --git a/oqamaint/suse.py b/oqamaint/suse.py index ab9d1f1d..d72294ae 100644 --- a/oqamaint/suse.py +++ b/oqamaint/suse.py @@ -5,14 +5,14 @@ import requests import osc.core -from update import Update +from oqamaint.update import Update MINIMALS = { x.rstrip() for x in requests.get( 'https://gitlab.suse.de/qa-maintenance/metadata/raw/master/packages-to-be-tested-on-minimal-systems').iter_lines() - if len(x) > 0 and not(x.startswith("#") or x.startswith(' '))} + if len(x) > 0 and not(x.startswith(b"#") or x.startswith(b' '))} class SUSEUpdate(Update):