FreeBSD Bugzilla – Attachment 205651 Details for
Bug 239106
textproc/unoconv: SyntaxError: Missing parentheses in call to 'print' with Python 3.x
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to make unoconv 0.6_1 run successfully with python3
unoconv.patch (text/plain), 8.08 KB, created by
Gerasimos Melissaratos
on 2019-07-10 09:25:32 UTC
(
hide
)
Description:
patch to make unoconv 0.6_1 run successfully with python3
Filename:
MIME Type:
Creator:
Gerasimos Melissaratos
Created:
2019-07-10 09:25:32 UTC
Size:
8.08 KB
patch
obsolete
>236c236 >< print >>sys.stderr, 'URE_BOOTSTRAP=%s' % os.environ['URE_BOOTSTRAP'] >--- >> print('URE_BOOTSTRAP=%s' % os.environ['URE_BOOTSTRAP'], file=sys.stderr) >238c238 >< print >>sys.stderr, 'UNO_PATH=%s' % os.environ['UNO_PATH'] >--- >> print('UNO_PATH=%s' % os.environ['UNO_PATH'], file=sys.stderr) >240,241c240,241 >< print >>sys.stderr, 'UNO_TYPES=%s' % os.environ['UNO_TYPES'] >< print 'PATH=%s' % os.environ['PATH'] >--- >> print('UNO_TYPES=%s' % os.environ['UNO_TYPES'], file=sys.stderr) >> print('PATH=%s' % os.environ['PATH']) >243c243 >< print >>sys.stderr, 'PYTHONHOME=%s' % os.environ['PYTHONHOME'] >--- >> print('PYTHONHOME=%s' % os.environ['PYTHONHOME'], file=sys.stderr) >245c245 >< print >>sys.stderr, 'PYTHONPATH=%s' % os.environ['PYTHONPATH'] >--- >> print('PYTHONPATH=%s' % os.environ['PYTHONPATH'], file=sys.stderr) >247c247 >< print >>sys.stderr, 'LD_LIBRARY_PATH=%s' % os.environ['LD_LIBRARY_PATH'] >--- >> print('LD_LIBRARY_PATH=%s' % os.environ['LD_LIBRARY_PATH'], file=sys.stderr) >338c338 >< print >>sys.stderr, "The following list of %s formats are currently available:\n" % doctype >--- >> print("The following list of %s formats are currently available:\n" % doctype, file=sys.stderr) >341c341 >< print >>sys.stderr, " %-8s - %s" % (fmt.name, fmt) >--- >> print(" %-8s - %s" % (fmt.name, fmt), file=sys.stderr) >533,534c533,534 >< except getopt.error, exc: >< print 'unoconv: %s, try unoconv -h for a list of all the options' % str(exc) >--- >> except getopt.error as exc: >> print('unoconv: %s, try unoconv -h for a list of all the options' % str(exc)) >565c565 >< print >>sys.stderr, 'Warning: Option %s cannot be parsed, ignoring.' % arg >--- >> print('Warning: Option %s cannot be parsed, ignoring.' % arg, file=sys.stderr) >584c584 >< print >>sys.stderr, 'Warning: Option %s cannot be parsed, ignoring.' % arg >--- >> print('Warning: Option %s cannot be parsed, ignoring.' % arg, file=sys.stderr) >592c592 >< print >>sys.stderr, 'Warning: This option is deprecated by --output.' >--- >> print('Warning: This option is deprecated by --output.', file=sys.stderr) >618c618 >< print >>sys.stderr, 'Verbosity set to level %d' % self.verbose >--- >> print('Verbosity set to level %d' % self.verbose, file=sys.stderr) >623,624c623,624 >< print >>sys.stderr, 'unoconv: you have to provide a filename as argument' >< print >>sys.stderr, 'Try `unoconv -h\' for more information.' >--- >> print('unoconv: you have to provide a filename as argument', file=sys.stderr) >> print('Try `unoconv -h\' for more information.', file=sys.stderr) >662,668c662,668 >< print 'unoconv %s' % VERSION >< print 'Written by Dag Wieers <dag@wieers.com>' >< print 'Homepage at http://dag.wieers.com/home-made/unoconv/' >< print >< print 'platform %s/%s' % (os.name, sys.platform) >< print 'python %s' % sys.version >< print product.ooName, product.ooSetupVersion >--- >> print('unoconv %s' % VERSION) >> print('Written by Dag Wieers <dag@wieers.com>') >> print('Homepage at http://dag.wieers.com/home-made/unoconv/') >> print ('\n') >> print('platform %s/%s' % (os.name, sys.platform)) >> print('python %s' % sys.version) >> print(product.ooName, product.ooSetupVersion) >673c673 >< print >>sys.stderr, 'usage: unoconv [options] file [file2 ..]' >--- >> print('usage: unoconv [options] file [file2 ..]', file=sys.stderr) >676c676 >< print >>sys.stderr, '''Convert from and to any format supported by LibreOffice >--- >> print('''Convert from and to any format supported by LibreOffice, file=sys.stderr) >701c701 >< ''' >--- >> ''') >717c717 >< except NoConnectException, e: >--- >> except NoConnectException as e: >752c752 >< except Exception, e: >--- >> except Exception as e: >795c795 >< # print >>sys.stderr, 'unoconv: format `%s\' is part of multiple doctypes %s, selecting `%s\'.' % (format, [fmt.doctype for fmt in outputfmt], outputfmt[0].doctype) >--- >> # print('unoconv: format `%s\' is part of multiple doctypes %s, selecting `%s\'.' % (format, [fmt.doctype for fmt in outputfmt], outputfmt[0].doctype), file=sys.stderr) >802c802 >< print >>sys.stderr, 'unoconv: format [%s/%s] is not known to unoconv.' % (op.doctype, op.format) >--- >> print('unoconv: format [%s/%s] is not known to unoconv.' % (op.doctype, op.format), file=sys.stderr) >804c804 >< print >>sys.stderr, 'unoconv: format [%s] is not known to unoconv.' % op.format >--- >> print('unoconv: format [%s] is not known to unoconv.' % op.format, file=sys.stderr) >816c816 >< print >>sys.stderr, 'Input file:', inputfn >--- >> print('Input file:', inputfn, file=sys.stderr) >819c819 >< print >>sys.stderr, 'unoconv: file `%s\' does not exist.' % inputfn >--- >> print('unoconv: file `%s\' does not exist.' % inputfn, file=sys.stderr) >857c857 >< print >>sys.stderr, 'unoconv: template file `%s\' does not exist.' % op.template >--- >> print('unoconv: template file `%s\' does not exist.' % op.template, file=sys.stderr) >927c927 >< except IOException, e: >--- >> except IOException as e: >934c934 >< except SystemError, e: >--- >> except SystemError as e: >938c938 >< except RuntimeException, e: >--- >> except RuntimeException as e: >942c942 >< except DisposedException, e: >--- >> except DisposedException as e: >946c946 >< except IllegalArgumentException, e: >--- >> except IllegalArgumentException as e: >950,951c950,951 >< except IOException, e: >< # for attr in dir(e): print '%s: %s', (attr, getattr(e, attr)) >--- >> except IOException as e: >> # for attr in dir(e): print('%s: %s', (attr, getattr(e, attr))) >955,956c955,956 >< except CannotConvertException, e: >< # for attr in dir(e): print '%s: %s', (attr, getattr(e, attr)) >--- >> except CannotConvertException as e: >> # for attr in dir(e): print('%s: %s', (attr, getattr(e, attr))) >960c960 >< except UnoException, e: >--- >> except UnoException as e: >985c985 >< except NoConnectException, e: >--- >> except NoConnectException as e: >994c994 >< except Exception, e: >--- >> except Exception as e: >1001c1001 >< print >>sys.stderr, msg >--- >> print(msg, file=sys.stderr) >1008c1008 >< print >>sys.stderr, "DEBUG:", msg >--- >> print("DEBUG:", msg, file=sys.stderr) >1012c1012 >< print >>sys.stderr, msg >--- >> print(msg, file=sys.stderr) >1034c1034 >< except Exception, e: >--- >> except Exception as e: >1083c1083 >< except NoConnectException, e: >--- >> except NoConnectException as e: >1113,1114c1113,1114 >< print >>sys.stderr, "unoconv: Cannot find a suitable pyuno library and python binary combination in %s" % of >< print >>sys.stderr, "ERROR:", sys.exc_info()[1] >--- >> print("unoconv: Cannot find a suitable pyuno library and python binary combination in %s" % of, file=sys.stderr) >> print("ERROR:", sys.exc_info()[1], file=sys.stderr) >1118,1120c1118,1120 >< print >>sys.stderr, "unoconv: Cannot find a suitable office installation on your system." >< print >>sys.stderr, "ERROR: Please locate your office installation and send your feedback to:" >< print >>sys.stderr, " http://github.com/dagwieers/unoconv/issues" >--- >> print("unoconv: Cannot find a suitable office installation on your system.", file=sys.stderr) >> print("ERROR: Please locate your office installation and send your feedback to:", file=sys.stderr) >> print(" http://github.com/dagwieers/unoconv/issues", file=sys.stderr) >1163c1163 >< except KeyboardInterrupt, e: >--- >> except KeyboardInterrupt as e:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 239106
:
205651
|
205652
|
205660
|
205661
|
205662
|
205663