From e08352978461fe799255eb3773402aee4e7f6d6b Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Thu, 26 Sep 2019 10:56:48 +0200 Subject: [PATCH] import-bug-from-debian: revert a change from the last merge: keep debianbts an optional dependency Signed-off-by: Mattia Rizzolo --- debian/control | 2 +- import-bug-from-debian | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index 2dc1a7e..125a3cf 100644 --- a/debian/control +++ b/debian/control @@ -48,7 +48,6 @@ Depends: python3, python3-apt, python3-debian, - python3-debianbts, python3-distro-info, python3-httplib2, python3-launchpadlib, @@ -71,6 +70,7 @@ Recommends: lintian, patch, pbuilder | cowbuilder | sbuild, + python3-debianbts, python3-dns, quilt, reportbug (>= 3.39ubuntu1), diff --git a/import-bug-from-debian b/import-bug-from-debian index bc1c4d0..df3d21d 100755 --- a/import-bug-from-debian +++ b/import-bug-from-debian @@ -1,5 +1,4 @@ #!/usr/bin/python3 -# -*- coding: utf-8 -*- # Copyright © 2009 James Westby , # 2010, 2011 Stefano Rivera @@ -23,7 +22,6 @@ # ################################################################## import argparse -import debianbts import logging import re import sys @@ -34,6 +32,12 @@ from launchpadlib.launchpad import Launchpad from ubuntutools.config import UDTConfig from ubuntutools.logger import Logger +try: + import debianbts +except ImportError: + Logger.error("Please install 'python3-debianbts' in order to use this utility.") + sys.exit(1) + def main(): bug_re = re.compile(r"bug=(\d+)")