<86>Aug 8 13:11:48 userdel[2429522]: delete user 'rooter' <86>Aug 8 13:11:48 userdel[2429522]: removed group 'rooter' owned by 'rooter' <86>Aug 8 13:11:48 userdel[2429522]: removed shadow group 'rooter' owned by 'rooter' <86>Aug 8 13:11:48 groupadd[2429536]: group added to /etc/group: name=rooter, GID=639 <86>Aug 8 13:11:48 groupadd[2429536]: group added to /etc/gshadow: name=rooter <86>Aug 8 13:11:48 groupadd[2429536]: new group: name=rooter, GID=639 <86>Aug 8 13:11:48 useradd[2429546]: new user: name=rooter, UID=639, GID=639, home=/root, shell=/bin/bash <86>Aug 8 13:11:48 userdel[2429564]: delete user 'builder' <86>Aug 8 13:11:48 userdel[2429564]: removed group 'builder' owned by 'builder' <86>Aug 8 13:11:48 userdel[2429564]: removed shadow group 'builder' owned by 'builder' <86>Aug 8 13:11:48 groupadd[2429578]: group added to /etc/group: name=builder, GID=640 <86>Aug 8 13:11:48 groupadd[2429578]: group added to /etc/gshadow: name=builder <86>Aug 8 13:11:48 groupadd[2429578]: new group: name=builder, GID=640 <86>Aug 8 13:11:48 useradd[2429590]: new user: name=builder, UID=640, GID=640, home=/usr/src, shell=/bin/bash <13>Aug 8 13:11:50 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Aug 8 13:11:50 rpmi: libexpat-2.2.10-alt1 p9+261554.100.1.1 1605103332 installed <13>Aug 8 13:11:50 rpmi: libp11-kit-0.23.15-alt2 p9+254920.2400.19.1 1601385869 installed <13>Aug 8 13:11:50 rpmi: libtasn1-4.14-alt1 p9+235792.100.2.1 1565425233 installed <13>Aug 8 13:11:50 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Aug 8 13:11:50 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Aug 8 13:11:50 rpmi: ca-certificates-2020.06.29-alt1 p9+258899.100.3.1 1601998604 installed <13>Aug 8 13:11:50 rpmi: ca-trust-0.1.2-alt1 p9+233349.100.1.1 1561655062 installed <13>Aug 8 13:11:50 rpmi: p11-kit-trust-0.23.15-alt2 p9+254920.2400.19.1 1601385869 installed <13>Aug 8 13:11:50 rpmi: libcrypto1.1-1.1.1k-alt1 p9+268376.100.3.1 1616720932 installed <13>Aug 8 13:11:50 rpmi: libssl1.1-1.1.1k-alt1 p9+268376.100.3.1 1616720932 installed <13>Aug 8 13:11:50 rpmi: python3-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>Aug 8 13:11:51 rpmi: libpython3-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>Aug 8 13:11:51 rpmi: python3-base-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>Aug 8 13:11:51 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Aug 8 13:11:51 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Aug 8 13:11:53 rpmi: python3-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Aug 8 13:11:53 rpmi: python-modules-curses-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:53 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>Aug 8 13:11:54 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686221 installed <13>Aug 8 13:11:54 rpmi: python3-dev-3.7.4-alt3 p9+249932.100.2.1 1587126956 installed <13>Aug 8 13:11:54 rpmi: libverto-0.3.0-alt1_7 sisyphus+225932.100.1.1 1553994917 installed <13>Aug 8 13:11:54 rpmi: libkeyutils-1.6-alt2 sisyphus+226520.100.2.1 1554512088 installed <13>Aug 8 13:11:54 rpmi: libcom_err-1.44.6-alt1 sisyphus+224154.100.1.1 1552091653 installed <86>Aug 8 13:11:54 groupadd[2450486]: group added to /etc/group: name=_keytab, GID=499 <86>Aug 8 13:11:54 groupadd[2450486]: group added to /etc/gshadow: name=_keytab <86>Aug 8 13:11:54 groupadd[2450486]: new group: name=_keytab, GID=499 <13>Aug 8 13:11:54 rpmi: libkrb5-1.17.2-alt2 p9+280683.100.2.1 1627489159 installed <13>Aug 8 13:11:54 rpmi: libtirpc-1.0.3-alt1 1532008015 installed <13>Aug 8 13:11:54 rpmi: libnsl2-1.1.0-alt1_1 1511548748 installed <13>Aug 8 13:11:54 rpmi: python-modules-compiler-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-email-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-unittest-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-encodings-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-nis-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-ctypes-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-multiprocessing-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-logging-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-tools-2to3-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-xml-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-hotshot-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-bsddb-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-modules-distutils-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-module-pkg_resources-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Aug 8 13:11:54 rpmi: libnsl2-devel-1.1.0-alt1_1 1511548748 installed <13>Aug 8 13:11:54 rpmi: python-dev-2.7.16-alt1.M90P.2 p9+260393.40.3.1 1604003646 installed <13>Aug 8 13:11:54 rpmi: python-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed <13>Aug 8 13:11:54 rpmi: python3-module-setuptools-1:40.8.0-alt2 sisyphus+229158.200.2.1 1557735221 installed Building target platforms: x86_64 Building for target x86_64 Wrote: /usr/src/in/nosrpm/python-module-xhtml2pdf-0.0.6-alt1.git20140628.2.nosrc.rpm (w1.gzdio) Installing python-module-xhtml2pdf-0.0.6-alt1.git20140628.2.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.37181 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python-module-xhtml2pdf-0.0.6 + echo 'Source #0 (python-module-xhtml2pdf-0.0.6.tar):' Source #0 (python-module-xhtml2pdf-0.0.6.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python-module-xhtml2pdf-0.0.6.tar + cd python-module-xhtml2pdf-0.0.6 + /bin/chmod -c -Rf u+rwX,go-w . + cp -fR . ../python3 + mv ../python3/test/witherror.py ../python3/test/witherror.bak ++ find ../python3 -type f -name '*.py' + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/tests/runtests.py file: ../python3/tests/runtests.py + 2to3 -w -n ../python3/tests/runtests.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to ../python3/tests/runtests.py RefactoringTool: Files that need to be modified: RefactoringTool: ../python3/tests/runtests.py + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/tests/__init__.py file: ../python3/tests/__init__.py + 2to3 -w -n ../python3/tests/__init__.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../python3/tests/__init__.py RefactoringTool: Files that were modified: RefactoringTool: ../python3/tests/__init__.py --- ../python3/tests/__init__.py (original) +++ ../python3/tests/__init__.py (refactored) @@ -1 +1 @@ -from runtests import buildTestSuite +from .runtests import buildTestSuite + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/tests/test_utils.py file: ../python3/tests/test_utils.py + 2to3 -w -n ../python3/tests/test_utils.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../python3/tests/test_utils.py RefactoringTool: Files that were modified: RefactoringTool: ../python3/tests/test_utils.py --- ../python3/tests/test_utils.py (original) +++ ../python3/tests/test_utils.py (refactored) @@ -145,7 +145,7 @@ } expected = (10.0, 20.0, 30.0, 40.0) result = getFrameDimensions(dims, 100, 200) - self.assertEquals(expected, result) + self.assertEqual(expected, result) def test_FrameDimensions_left_top_bottom_right(self): dims = { @@ -156,7 +156,7 @@ } expected = (10.0, 20.0, 50.0, 150.0) result = getFrameDimensions(dims, 100, 200) - self.assertEquals(expected, result) + self.assertEqual(expected, result) def test_FrameDimensions_bottom_right_width_height(self): dims = { @@ -167,7 +167,7 @@ } expected = (10.0, 110.0, 70.0, 80.0) result = getFrameDimensions(dims, 100, 200) - self.assertEquals(expected, result) + self.assertEqual(expected, result) def test_FrameDimensions_left_top_width_height_with_margin(self): dims = { @@ -182,7 +182,7 @@ } expected = (25.0, 30.0, 30.0, 50.0) result = getFrameDimensions(dims, 100, 200) - self.assertEquals(expected, result) + self.assertEqual(expected, result) def test_FrameDimensions_bottom_right_width_height_with_margin(self): dims = { @@ -197,7 +197,7 @@ } expected = (25.0, 120.0, 30.0, 50.0) result = getFrameDimensions(dims, 100, 200) - self.assertEquals(expected, result) + self.assertEqual(expected, result) def test_frame_dimensions_for_box_len_eq_4(self): dims = { @@ -216,7 +216,7 @@ } expected = (10.0, 0.0, 30.0, 200.0) result = getFrameDimensions(dims, 100, 200) - self.assertEquals(expected, result) + self.assertEqual(expected, result) def test_trame_dimentions_for_width_without_left_or_right(self): dims = { @@ -227,7 +227,7 @@ } expected = (0.0, 20.0, 100.0, 40.0) result = getFrameDimensions(dims, 100, 200) - self.assertEquals(expected, result) + self.assertEqual(expected, result) class GetPosTestCase(TestCase): def test_get_pos_simple(self): + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/tests/test_parser.py file: ../python3/tests/test_parser.py + 2to3 -w -n ../python3/tests/test_parser.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to ../python3/tests/test_parser.py RefactoringTool: Files that need to be modified: RefactoringTool: ../python3/tests/test_parser.py + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/testrender/testrender.py file: ../python3/testrender/testrender.py + 2to3 -w -n ../python3/testrender/testrender.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../python3/testrender/testrender.py --- ../python3/testrender/testrender.py (original) +++ ../python3/testrender/testrender.py (refactored) @@ -12,7 +12,7 @@ def render_pdf(filename, output_dir, options): if options.debug: - print 'Rendering %s' % filename + print('Rendering %s' % filename) basename = os.path.basename(filename) outname = '%s.pdf' % os.path.splitext(basename)[0] outfile = os.path.join(output_dir, outname) @@ -26,14 +26,14 @@ output.close() if result.err: - print 'Error rendering %s: %s' % (filename, result.err) + print('Error rendering %s: %s' % (filename, result.err)) sys.exit(1) return outfile def convert_to_png(infile, output_dir, options): if options.debug: - print 'Converting %s to PNG' % infile + print('Converting %s to PNG' % infile) basename = os.path.basename(infile) filename = os.path.splitext(basename)[0] outname = '%s.page%%0d.png' % filename @@ -47,7 +47,7 @@ def create_diff_image(srcfile1, srcfile2, output_dir, options): if options.debug: - print 'Creating difference image for %s and %s' % (srcfile1, srcfile2) + print('Creating difference image for %s and %s' % (srcfile1, srcfile2)) outname = '%s.diff%s' % os.path.splitext(srcfile1) outfile = os.path.join(output_dir, outname) @@ -55,13 +55,13 @@ diff_value = int(result.strip()) if diff_value > 0: if not options.quiet: - print 'Image %s differs from reference, value is %i' % (srcfile1, diff_value) + print('Image %s differs from reference, value is %i' % (srcfile1, diff_value)) return outfile, diff_value def copy_ref_image(srcname, output_dir, options): if options.debug: - print 'Copying reference image %s ' % srcname + print('Copying reference image %s ' % srcname) dstname = os.path.basename(srcname) dstfile = os.path.join(output_dir, '%s.ref%s' % os.path.splitext(dstname)) shutil.copyfile(srcname, dstfile) @@ -71,14 +71,14 @@ def create_thumbnail(filename, options): thumbfile = '%s.thumb%s' % os.path.splitext(filename) if options.debug: - print 'Creating thumbnail of %s' % filename + print('Creating thumbnail of %s' % filename) exec_cmd(options, options.convert_cmd, '-resize', '20%', filename, thumbfile) return thumbfile def render_file(filename, output_dir, ref_dir, options): if not options.quiet: - print 'Rendering %s' % filename + print('Rendering %s' % filename) pdf = render_pdf(filename, output_dir, options) pngs = convert_to_png(pdf, output_dir, options) if options.create_reference: @@ -91,7 +91,7 @@ for page in pages: refsrc = os.path.join(ref_dir, os.path.basename(page['png'])) if not os.path.isfile(refsrc): - print 'Reference image for %s not found!' % page['png'] + print('Reference image for %s not found!' % page['png']) continue page['ref'] = copy_ref_image(refsrc, output_dir, options) page['ref_thumb'] = create_thumbnail(page['ref'], options) @@ -106,13 +106,13 @@ def exec_cmd(options, *args): if options.debug: - print 'Executing %s' % ' '.join(args) + print('Executing %s' % ' '.join(args)) proc = Popen(args, stdout=PIPE, stderr=PIPE) result = proc.communicate() if options.debug: - print result[0], result[1] + print(result[0], result[1]) if proc.returncode: - print 'exec error (%i): %s' % (proc.returncode, result[1]) + print('exec error (%i): %s' % (proc.returncode, result[1])) sys.exit(1) return result[0], result[1] @@ -127,7 +127,7 @@ '

%(pdf)s

\n' % {'pdf': pdfname}) for i, page in enumerate(pages): - vars = dict(((k, os.path.basename(v)) for k,v in page.items() + vars = dict(((k, os.path.basename(v)) for k,v in list(page.items()) RefactoringTool: Files that were modified: RefactoringTool: ../python3/testrender/testrender.py if k != 'diff_value')) vars['page'] = i+1 if 'diff' in page: @@ -216,15 +216,15 @@ num = len(results) if options.create_reference is not None: - print 'Created reference for %i file%s' % (num, '' if num == 1 else 's') + print('Created reference for %i file%s' % (num, '' if num == 1 else 's')) else: htmlfile = create_html_file(results, template_file, output_dir, options) if not options.quiet: - print 'Rendered %i file%s' % (num, '' if num == 1 else 's') - print '%i file%s differ%s from reference' % \ + print('Rendered %i file%s' % (num, '' if num == 1 else 's')) + print('%i file%s differ%s from reference' % \ (diff_count, diff_count != 1 and 's' or '', - diff_count == 1 and 's' or '') - print 'Check %s for results' % htmlfile + diff_count == 1 and 's' or '')) + print('Check %s for results' % htmlfile) if diff_count: sys.exit(1) + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/test/visualdiff.py file: ../python3/test/visualdiff.py + 2to3 -w -n ../python3/test/visualdiff.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../python3/test/visualdiff.py RefactoringTool: Files that were modified: RefactoringTool: ../python3/test/visualdiff.py --- ../python3/test/visualdiff.py (original) +++ ../python3/test/visualdiff.py (refactored) @@ -40,21 +40,21 @@ self.folder4del = None def execute(self, *a): - print "EXECUTE", " ".join(a) + print("EXECUTE", " ".join(a)) return subprocess.Popen(a, stdout=subprocess.PIPE).communicate()[0] def getFiles(self, folder, pattern="*.*"): pattern = os.path.join(folder, pattern) self.files = [x for x in glob.glob(pattern) if not x.startswith(".")] self.files.sort() - print "FILES", self.files + print("FILES", self.files) return self.files def loadFile(self, file, folder=None, delete=True): if folder is None: folder = self.folder4del = tempfile.mkdtemp(prefix="visualdiff-tmp-") delete = True - print "FOLDER", folder, "DELETE", delete + print("FOLDER", folder, "DELETE", delete) source = os.path.abspath(file) destination = os.path.join(folder, "image.png") self.execute(CONVERT, source, destination) @@ -62,12 +62,12 @@ return folder def compare(self, other, chunk=16 * 1024): - if len(self.files) <> len(other.files): + if len(self.files) != len(other.files): return False for i in range(len(self.files)): a = open(self.files[i], "rb") b = open(other.files[i], "rb") - if a.read() <> b.read(): + if a.read() != b.read(): return False return True @@ -105,7 +105,7 @@ options, args = getoptions() - print args + print(args) a = VisualObject() b = VisualObject() @@ -113,7 +113,7 @@ a.loadFile("expected/test-loremipsum.pdf") b.files = a.files - print a.compare(b) + print(a.compare(b)) if __name__=="__main__": main() + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/test/testEvenOddPage.py file: ../python3/test/testEvenOddPage.py + 2to3 -w -n ../python3/test/testEvenOddPage.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to ../python3/test/testEvenOddPage.py RefactoringTool: Files that need to be modified: RefactoringTool: ../python3/test/testEvenOddPage.py + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/test/testBackground.py file: ../python3/test/testBackground.py + 2to3 -w -n ../python3/test/testBackground.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to ../python3/test/testBackground.py RefactoringTool: Files that need to be modified: RefactoringTool: ../python3/test/testBackground.py + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/test/story2canvas.py file: ../python3/test/story2canvas.py + 2to3 -w -n ../python3/test/story2canvas.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to ../python3/test/story2canvas.py RefactoringTool: Files that need to be modified: RefactoringTool: ../python3/test/story2canvas.py + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/test/simple.py file: ../python3/test/simple.py + 2to3 -w -n ../python3/test/simple.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../python3/test/simple.py RefactoringTool: Files that were modified: RefactoringTool: ../python3/test/simple.py --- ../python3/test/simple.py (original) +++ ../python3/test/simple.py (refactored) @@ -21,7 +21,7 @@ import os import sys import cgi -import cStringIO +import io import logging import xhtml2pdf.pisa as pisa @@ -36,7 +36,7 @@ #if pdf.warn: # print "*** %d WARNINGS OCCURED" % pdf.warn if pdf.err: - print "*** %d ERRORS OCCURED" % pdf.err + print("*** %d ERRORS OCCURED" % pdf.err) def testSimple( data="""Hello World
""", @@ -49,7 +49,7 @@ """ pdf = pisa.CreatePDF( - cStringIO.StringIO(data), + io.StringIO(data), file(dest, "wb") ) @@ -65,20 +65,20 @@ file object and then send it to STDOUT """ - result = cStringIO.StringIO() + result = io.StringIO() pdf = pisa.CreatePDF( - cStringIO.StringIO(data), + io.StringIO(data), result ) if pdf.err: - print "Content-Type: text/plain" - print + print("Content-Type: text/plain") + print() dumpErrors(pdf) else: - print "Content-Type: application/octet-stream" - print + print("Content-Type: application/octet-stream") + print() sys.stdout.write(result.getvalue()) def testBackgroundAndImage( @@ -115,10 +115,10 @@ the Reportlab Toolkit needs real filenames for images and stuff. Then we also pass the url as 'path' for relative path calculations. """ - import urllib + import urllib.request, urllib.parse, urllib.error pdf = pisa.CreatePDF( - urllib.urlopen(url), + urllib.request.urlopen(url), file(dest, "wb"), log_warn = 1, log_err = 1, + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/test/pdfjoiner.py file: ../python3/test/pdfjoiner.py + 2to3 -w -n ../python3/test/pdfjoiner.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../python3/test/pdfjoiner.py RefactoringTool: Files that were modified: RefactoringTool: ../python3/test/pdfjoiner.py --- ../python3/test/pdfjoiner.py (original) +++ ../python3/test/pdfjoiner.py (refactored) @@ -27,7 +27,7 @@ pdf = pisa_pdf.pisaPDF() subPdf = pisa.pisaDocument( - u""" + """ Hello World """) pdf.addDocument(subPdf) + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/test/linkloading.py file: ../python3/test/linkloading.py + 2to3 -w -n ../python3/test/linkloading.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../python3/test/linkloading.py RefactoringTool: Files that were modified: RefactoringTool: ../python3/test/linkloading.py --- ../python3/test/linkloading.py (original) +++ ../python3/test/linkloading.py (refactored) @@ -64,7 +64,7 @@ tmpFile.close() self.tmpFileList.append(tmpPath) return tmpPath - except Exception, e: + except Exception as e: log.exception("myLinkLoader.getFileName") return None @@ -74,7 +74,7 @@ lc = myLinkLoader(database="some_name", port=666).getFileName pdf = pisa.CreatePDF( - u""" + """

Hello World

+ for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/test/helloworld.py file: ../python3/test/helloworld.py + 2to3 -w -n ../python3/test/helloworld.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../python3/test/helloworld.py RefactoringTool: Files that were modified: RefactoringTool: ../python3/test/helloworld.py --- ../python3/test/helloworld.py (original) +++ ../python3/test/helloworld.py (refactored) @@ -23,7 +23,7 @@ def helloWorld(): filename = __file__ + ".pdf" pdf = pisa.CreatePDF( - u"Hello World", + "Hello World", file(filename, "wb") ) if not pdf.err: + for i in $(find ../python3 -type f -name '*.py') + echo file: ../python3/test/datauri.py file: ../python3/test/datauri.py + 2to3 -w -n ../python3/test/datauri.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ../python3/test/datauri.py RefactoringTool: Files that were modified: RefactoringTool: ../python3/test/datauri.py --- ../python3/test/datauri.py (original) +++ ../python3/test/datauri.py (refactored) @@ -28,7 +28,7 @@ datauri = pisa.makeDataURIFromFile('img/denker.png') bguri = os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir, "pdf/background-sample.pdf")) bguri = pisa.makeDataURIFromFile(bguri) - html = u""" + html = """