Skip to content
Commits on Source (5)
trydiffoscope.1.rst
README.rst
pyproject.toml
trydiffoscope
trydiffoscope (67.0.4) unstable; urgency=medium
* Add trydiffoscope script to MANIFEST.
(Closes: reproducible-builds/trydiffoscope#1)
* Add a suitable shebang and executable bit to setup.py.
* Update Black source code formatting.
-- Chris Lamb <lamby@debian.org> Sun, 12 Jan 2020 17:23:32 +0000
trydiffoscope (67.0.3) unstable; urgency=medium
* Move to Build-Depends on python3-docutils over python-docutils to allow for
* Python 2.x removal. (Closes: #943293)
Python 2.x removal. (Closes: #943293)
-- Chris Lamb <lamby@debian.org> Wed, 23 Oct 2019 09:35:43 +0100
......
#!/usr/bin/env python3
from distutils.core import setup
setup(
name='trydiffoscope',
version='67.0.3',
version='67.0.4',
author="Chris Lamb",
author_email="lamby@debian.org",
scripts=('trydiffoscope',),
......
......@@ -33,10 +33,13 @@ class TryDiffoscope(object):
self.session = requests.Session()
def main(self):
response = self.session.post(self.args.endpoint, files={
'file_a': open(self.args.file[0], 'rb'),
'file_b': open(self.args.file[1], 'rb'),
})
response = self.session.post(
self.args.endpoint,
files={
'file_a': open(self.args.file[0], 'rb'),
'file_b': open(self.args.file[1], 'rb'),
},
)
response.raise_for_status()
poll_uri = response.json()['result']['uri']
......@@ -61,10 +64,12 @@ class TryDiffoscope(object):
time.sleep(1)
if comparison['state'] not in ('identical', 'different'):
print("E: Received state '{}' from server. See {}".format(
comparison['state'],
comparison['uri'],
), file=sys.stderr)
print(
"E: Received state '{}' from server. See {}".format(
comparison['state'], comparison['uri'],
),
file=sys.stderr,
)
return 2
if comparison['state'] == 'identical':
......@@ -92,10 +97,7 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument(
'file',
help="files to compare",
nargs=2,
default=[],
'file', help="files to compare", nargs=2, default=[],
)
parser.add_argument(
......@@ -105,15 +107,11 @@ if __name__ == '__main__':
)
parser.add_argument(
'--text',
help="write plain text output to given file",
default=None,
'--text', help="write plain text output to given file", default=None,
)
parser.add_argument(
'--html',
help="write HTML report to given file",
default=None,
'--html', help="write HTML report to given file", default=None,
)
parser.add_argument(
......@@ -127,7 +125,7 @@ if __name__ == '__main__':
'-w',
'--webbrowser',
help="open webbrowser to URL instead of managing results "
"locally (implies -u)",
"locally (implies -u)",
action='store_true',
)
......