Benjamin Drung
aa556af89d
Use f-strings
...
pylint complains about C0209: Formatting a regular string which could be
a f-string (consider-using-f-string)
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 19:32:58 +01:00
Benjamin Drung
444b319c12
Implement refactorings found by pylint
...
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 16:58:24 +01:00
Benjamin Drung
4449cf2437
Fix warnings found by pylint
...
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 15:51:29 +01:00
Benjamin Drung
909d945af4
Replace deprecated optparse with argparse
...
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 13:33:18 +01:00
Benjamin Drung
f6fde2e217
fix: Use lazy % formatting in logging functions
...
pylint complains about W1201: Use lazy % formatting in logging functions
(logging-not-lazy) and W1203: Use lazy % formatting in logging functions
(logging-fstring-interpolation).
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-31 11:13:07 +01:00
Benjamin Drung
b1bc7e1cdc
Address pylint complaints
...
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-30 23:10:31 +01:00
Benjamin Drung
4e27045f49
style: Sort Python imports with isort
...
```
isort -l 99 --profile=black .
```
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-30 21:28:47 +01:00
Benjamin Drung
3354b526b5
style: Format Python code with black
...
```
PYTHON_SCRIPTS=$(grep -l -r '^#! */usr/bin/python3$' .)
black -C -l 99 . $PYTHON_SCRIPTS
```
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2023-01-30 19:45:36 +01:00
Dan Streetman
0eeb93ee0c
logging: update ubuntutools.getLogger() to output to stdout/stderr correctly
...
Python logging by default sends all output to stderr, but that's not what
normal programs usually do and is not expected for these scripts.
Change the ubuntutools.getLogger() method to return a logger with handlers
correctly set up to send INFO level (or lower) logs to stdout and WARNING
level (or higher; technically INFO+1 level or higher) logs to stderr.
This results in normally logged output going to stdout and warnings/errors
going to stderr, as expected.
2021-02-02 06:25:12 -05:00
Dan Streetman
fe30873247
submittodebian: open file in binary mode before writing utf-8 encoded bytes
...
LP: #1863119
2020-02-13 17:39:01 -05:00
Dan Streetman
90e8fe81e1
replace ubuntutools.logger with standard python logging
2019-11-25 10:10:06 -05:00
Dan Streetman
b5ae0bdca3
simplify subprocess usage
2019-11-25 09:57:54 -05:00
Dan Streetman
17cce2602c
submittodebian: use file context manager
2019-11-07 15:10:16 -05:00
Stefano Rivera
38632a190e
We depend on python3-debian
2019-09-05 09:50:09 -03:00
Stefano Rivera
301569e809
Pull out Python 2 support hacks
2019-09-04 19:24:44 -03:00
Stefano Rivera
3f5e56c75e
Port submittodebian to Python 3
2019-09-04 19:24:44 -03:00
Benjamin Drung
cc7170eccb
Fix all flake8 issues
2017-05-01 00:20:03 +02:00
Stefano Rivera
4d28dfb9e6
Pass --builder=dpkg-buildpackage to bzr bd, in case the user has
...
configured a custom builder that doesn't do source builds (LP: #1019817 )
2012-07-02 19:24:09 +02:00
Stefano Rivera
0a5812f168
submittodebian: Use --include instead of --attach when not using reportbug's
...
internal MUA.
2012-07-02 15:05:39 +02:00
Stefano Rivera
a8a1eef67a
Use dpkg-buildpackage instead of debuild in submittodebian. It really
...
doesn't need to run lintian twice.
2012-07-02 13:21:10 +02:00
Stefano Rivera
605b27a550
submittodebian; Unset DEBEMAIL when building source package.
...
(LP: #1015066 )
2012-06-20 22:44:12 +02:00
Stefano Rivera
9f33928d38
submittodebian: Explitictly UTF-8 encode the bug body (LP: #1005834 )
2012-06-20 22:20:22 +02:00
Stefano Rivera
4f308cdf62
submittodebian: Style tweaks
2012-06-20 22:17:07 +02:00
Benjamin Drung
337917c4d9
Break long lines into two commands.
2012-05-27 00:46:24 +02:00
Stefano Rivera
4f66ed834b
Move reportbug existance check after argument parsing
2012-05-12 19:21:39 -07:00
Stefano Rivera
055dce8f40
submittodebian: Revert Ubuntu Maintainer mangling, and re-build the source
...
package before diffing. (LP: #902233 )
2012-05-06 19:46:05 +02:00
Stefano Rivera
343ac49b39
pbuilder-dist, pull-debian-source, pull-lp-source, requestsync,
...
reverse-depends, submittodebian, syncpackage:
Handle outdated distro-info data. Fall back to sane defaults where
possible.
2012-05-06 10:15:54 +02:00
Stefano Rivera
083d44f676
submittodebian: Use optparse to display --help (LP: #988009 )
2012-05-05 19:34:02 +02:00
Stefano Rivera
2e8f16c972
submittodebian: rm the tmpdir with a little more force (shutil.rmtree) (LP: #899399 )
2011-12-03 00:06:35 +02:00
Stefano Rivera
bb1dcea894
And VISUAL
2011-12-03 00:03:00 +02:00
Stefano Rivera
5b8ac8354e
submittodebian: Do the report boiler-plate checking in a script that wraps
...
an editor, so that we only edit the report once, after checking for
duplicates.
2011-12-02 23:42:29 +02:00
Stefano Rivera
ff9305976b
submittodebian: Check existing bug reports before editing anything.
2011-12-02 21:33:10 +02:00
Stefano Rivera
cefbe3ccc2
* New scripts:
...
- reverse-depends: Replaces reverse-build-depends. Uses an UbuntuWire
webservice for determining all reverse(-build)-dependencies for a
package. (LP: #696373 )
- requestbackport: Files a backport request bug report, including a full
testing checklist.
* Don't allow boilerplate prompts through in submittodebian and requestsync
(LP: #887336 )
2011-11-13 21:31:01 +02:00
Stefano Rivera
1f91b015ab
Use subprocess and EditFile in submittodebian
2011-11-13 20:54:05 +02:00
Stefano Rivera
12b5dfd4da
submittodebian: Use prettier patch filenames (LP: #887333 )
2011-11-13 00:09:41 +02:00
Stefano Rivera
1fc55fe66d
* submittodebian:
...
- Don't parse the entire changelog, to avoid bumping into past illegal
version numbers (LP: #727314 )
- Iterate over changelog blocks rather than using Chancgelog's private
_blocks list.
[ Stefano Rivera ]
*
2011-09-09 23:54:36 +02:00
Stefano Rivera
de25fb4a6c
submittodebian: Don't parse the entire changelog, to avoid bumping into
...
past illegal version numbers (LP: #727314 )
2011-09-09 20:20:29 +02:00
Stefano Rivera
0d4c692262
dgetlp, submittodebian, 404main: Use unicode strings for literal strings
...
containing non-ASCII characters (LP: #836661 )
2011-09-04 18:02:55 +02:00
Benjamin Drung
a03fa654f3
Move debian-distro-info, distro-info, and ubuntu-distro-info from
...
ubuntu-dev-tools into distro-info.
2011-06-25 17:53:44 +02:00
Benjamin Drung
61cc8e57ba
submittodebian: Write a usable .reportbugrc if it doesn't exist. (LP: #800429 )
2011-06-25 15:35:17 +02:00
Stefano Rivera
dd46215fbe
submittodebian: Write a usable .reportbugrc if it doesn't exist.
...
(LP: #800429 )
2011-06-22 12:15:57 +02:00
Benjamin Drung
1a8951e82d
Use new ubuntutools.distro_info in various scripts.
2011-01-21 19:20:04 +01:00
Benjamin Drung
08042bf61f
submittodebian: Make pylint happier.
2010-12-27 20:02:11 +01:00
Benjamin Drung
f8d3f9f2f5
Wrap all long lines in Python scripts.
2010-12-27 14:21:01 +01:00
Benjamin Drung
493597a500
Convert tabs to spaces in Python scripts (PEP-8) part 1.
2010-12-22 01:28:00 +01:00
Benjamin Drung
1943df29eb
Remove all trailing spaces.
2010-12-03 00:06:43 +01:00
Colin Watson
684e340b54
submittodebian: Encourage sending multiple independent pieces of the
...
Ubuntu patch in separate bug reports.
2010-12-01 16:51:09 +00:00
Daniel Holbach
a7677ff836
submittodebian: rephrase boilerplate text to be more polite, add reminder
...
to explain the patch sufficiently and add necessary information.
2010-11-30 11:56:36 +01:00
Michael Bienia
403a1a9412
Add 'natty' to the recognized names and make it the default.
2010-09-15 09:23:28 +02:00
Michael Bienia
bbe51620d4
Update to the new python-debian version:
...
- Depend on python-debian >= 1.1.15
- Replace imports of debian_bundle with debian to fix the deprecation
warnings.
2010-06-08 19:09:40 +02:00