[dak/master 1/8] Rename ContentsScanner to BinaryContentsScanner.
Signed-off-by: Torsten Werner <twerner@debian.org>
---
dak/contents.py | 4 ++--
daklib/contents.py | 8 ++++----
tests/dbtest_contents.py | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dak/contents.py b/dak/contents.py
index d763f86..ff3a97d 100755
--- a/dak/contents.py
+++ b/dak/contents.py
@@ -40,7 +40,7 @@ import apt_pkg
from daklib.config import Config
from daklib.dbconn import *
-from daklib.contents import ContentsScanner, ContentsWriter
+from daklib.contents import BinaryContentsScanner, ContentsWriter
from daklib import daklog
from daklib import utils
@@ -84,7 +84,7 @@ def write_all(cnf, suite_names = [], force = None):
def scan_all(cnf, limit):
Logger = daklog.Logger(cnf.Cnf, 'contents scan')
- result = ContentsScanner.scan_all(limit)
+ result = BinaryContentsScanner.scan_all(limit)
processed = '%(processed)d packages processed' % result
remaining = '%(remaining)d packages remaining' % result
Logger.log([processed, remaining])
diff --git a/daklib/contents.py b/daklib/contents.py
index a158e8f..df571e1 100755
--- a/daklib/contents.py
+++ b/daklib/contents.py
@@ -258,10 +258,10 @@ def generate_helper(suite_id, arch_id, overridetype_id, component_id = None):
return log_message
-class ContentsScanner(object):
+class BinaryContentsScanner(object):
'''
- ContentsScanner provides a threadsafe method scan() to scan the contents of
- a DBBinary object.
+ BinaryContentsScanner provides a threadsafe method scan() to scan the
+ contents of a DBBinary object.
'''
def __init__(self, binary_id):
'''
@@ -313,7 +313,7 @@ def scan_helper(binary_id):
'''
This function runs in a subprocess.
'''
- scanner = ContentsScanner(binary_id)
+ scanner = BinaryContentsScanner(binary_id)
scanner.scan()
diff --git a/tests/dbtest_contents.py b/tests/dbtest_contents.py
index 90fe496..957307b 100755
--- a/tests/dbtest_contents.py
+++ b/tests/dbtest_contents.py
@@ -3,7 +3,7 @@
from db_test import DBDakTestCase, fixture
from daklib.dbconn import *
-from daklib.contents import ContentsWriter, ContentsScanner, UnpackedSource
+from daklib.contents import ContentsWriter, BinaryContentsScanner, UnpackedSource
from os.path import normpath
from sqlalchemy.exc import FlushError, IntegrityError
@@ -167,7 +167,7 @@ class ContentsTestCase(DBDakTestCase):
self.assertEqual(['usr/bin/hello', 'usr/share/doc/hello/copyright'],
filelist)
self.session.commit()
- ContentsScanner(self.binary['hello_2.2-1_i386'].binary_id).scan()
+ BinaryContentsScanner(self.binary['hello_2.2-1_i386'].binary_id).scan()
bin_contents_list = self.binary['hello_2.2-1_i386'].contents.order_by('file').all()
self.assertEqual(2, len(bin_contents_list))
self.assertEqual('usr/bin/hello', bin_contents_list[0].file)
--
1.7.2.5
Reply to: