[elbe-devel] [PATCH 25/40] pylint: updated - remove/annotate unused parameter
Torben Hohn
torben.hohn at linutronix.de
Thu Sep 20 13:19:14 CEST 2018
On Fri, Sep 14, 2018 at 01:56:37PM +0200, Manuel Traut wrote:
> annotate them, because it is a defined callback
>
> Signed-off-by: Manuel Traut <manut at linutronix.de>
> ---
> elbepack/updated.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/elbepack/updated.py b/elbepack/updated.py
> index af4207f0..dff49681 100644
> --- a/elbepack/updated.py
> +++ b/elbepack/updated.py
> @@ -187,7 +187,7 @@ class rw_access(object):
> self.status.log("remount %s readonly" % self.mount)
> os.system("sync")
> cmd = "mount -o remount,ro %s" % self.mount
> - ret = os.system(cmd)
> + os.system(cmd)
looks like this does not belong here.
do we really want to ignore the return value of the remount ?
i believe, that we should at least log it.
>
> def get_mount_status(self):
> with open('/etc/mtab') as mtab:
> @@ -599,6 +599,7 @@ def handle_update_file(upd_file, status, remove=False):
>
>
> def shutdown(signum, fname, status):
please use _fname for unused parameters.
def shutdown(_signum, _fname, status):
apart from that:
1. i dont see that updated.shutdown() is used anywhere
2. commands.updated.shutdown() exists, and is used with signal.signal()
however... docs say, the handler only takes 2 arguments
> + # pylint: disable=unused-argument
> status.stop = True
> for mon in status.monitors:
> mon.stop()
> --
> 2.19.0.rc2
>
--
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/kontakt/Datenschutz.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20180920/cd25eda2/attachment.sig>
More information about the elbe-devel
mailing list