Commit 2c64b9b3 authored by Jérémy Bobbio's avatar Jérémy Bobbio

Cleanup imports with pyflakes help

Thanks to Hans-Christoph Steiner for the suggestion.
parent 28c6f763
......@@ -22,7 +22,6 @@ import os.path
import re
import sys
from debbindiff import logger
from debbindiff.difference import Difference, get_source
from debbindiff.comparators.binary import compare_binary_files
from debbindiff.comparators.bzip2 import compare_bzip2_files
from debbindiff.comparators.changes import compare_changes_files
......
......@@ -17,6 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with debbindiff. If not, see <http://www.gnu.org/licenses/>.
import sys
from debbindiff import logger
from debbindiff.changes import Changes
import debbindiff.comparators
......
......@@ -18,7 +18,6 @@
# along with debbindiff. If not, see <http://www.gnu.org/licenses/>.
from contextlib import contextmanager
import gzip
import subprocess
import os.path
import debbindiff.comparators
......
......@@ -17,7 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with debbindiff. If not, see <http://www.gnu.org/licenses/>.
import os.path
import subprocess
from debbindiff.comparators.utils import binary_fallback
from debbindiff.difference import Difference
......
......@@ -18,6 +18,7 @@
# along with debbindiff. If not, see <http://www.gnu.org/licenses/>.
import os.path
import re
import subprocess
from zipfile import ZipFile
from debbindiff import logger
......
......@@ -17,7 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with debbindiff. If not, see <http://www.gnu.org/licenses/>.
import difflib
import os.path
class Difference(object):
......
......@@ -22,7 +22,6 @@ import os.path
import re
import subprocess
import sys
from tempfile import NamedTemporaryFile
from xml.sax.saxutils import escape
from debbindiff import logger
from debbindiff.comparators.utils import make_temp_directory
......@@ -144,7 +143,7 @@ def output_difference(difference, print_func):
print_func(create_diff(difference.lines1, difference.lines2))
for detail in difference.details:
output_difference(detail, print_func)
except PrintLimitReached, e:
except PrintLimitReached:
logger.debug('print limit reached')
raise
finally:
......@@ -158,7 +157,7 @@ def output_html(differences, print_func=None):
print_func(HEADER % { 'title': escape(' '.join(sys.argv)) })
for difference in differences:
output_difference(difference, print_func)
except PrintLimitReached, e:
except PrintLimitReached:
logger.debug('print limit reached')
print_func("<div class='error'>Max output size reached.</div>", force=True)
print_func(FOOTER, force=True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment