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
90e8fe81e1
replace ubuntutools.logger with standard python logging
2019-11-25 10:10:06 -05:00
Stefano Rivera
673234e449
Port seeded-in-ubuntu to Python 3
2019-09-04 19:24:44 -03:00
Benjamin Drung
c2aa97dba2
Move devscripts.logger to ubuntutools.logger.
2013-03-19 00:18:02 +01:00
Stefano Rivera
a3bd35bd0c
seeded-in-ubuntu: Clarify that "not seeded" binary packages may not exist
...
(LP: #1029620 )
2013-01-12 14:34:04 +02:00
Stefano Rivera
73acf77646
seeded-in-ubuntu Inform the user when we couldn't determine binary
...
packages built by a source package, as it most recently FTBFS.
2012-07-18 12:28:35 +02:00
Stefano Rivera
fa83ac6b0b
seeded-in-ubuntu: Catch errors in parsing data, and don't keep unreadable
...
data cached (LP: #1008783 )
2012-06-20 22:28:35 +02:00
Stefano Rivera
b05cbfd8f9
seeded-in-ubuntu: Log into launchpad anonymously (LP: #979849 )
2012-04-12 18:23:00 +02:00
Stefano Rivera
34efc162a2
And another rename, let this be the last
2011-12-09 00:23:07 +02:00