diff options
author | Paride Legovini <paride@ubuntu.com> | 2022-05-05 16:30:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 09:30:59 -0500 |
commit | dd494ed462f73a311194509f92154f732415aa22 (patch) | |
tree | cd5ed5e0335bfd0e35712ecd94a192b5da365079 /cloudinit/cmd | |
parent | d1149988323bb88ec8ee6aa14bdd9d0618582771 (diff) | |
download | cloud-init-git-dd494ed462f73a311194509f92154f732415aa22.tar.gz |
Update linters and adapt code for compatibility (#1434)
Changes:
- pylint 2.13.8: fix E0601(used-before-assignment)
- pylint 2.13.8: fix E4702(modified-iterating-dict)
- pylint 2.13.8: silence W0402(deprecated-module) on distutils.errors
- tox: bump linters versions
Diffstat (limited to 'cloudinit/cmd')
-rwxr-xr-x | cloudinit/cmd/devel/hotplug_hook.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/cmd/devel/hotplug_hook.py b/cloudinit/cmd/devel/hotplug_hook.py index a2046989..29439911 100755 --- a/cloudinit/cmd/devel/hotplug_hook.py +++ b/cloudinit/cmd/devel/hotplug_hook.py @@ -209,6 +209,7 @@ def handle_hotplug(hotplug_init: Init, devpath, subsystem, udevaction): success_fn=hotplug_init._write_to_cache, ) # type: UeventHandler wait_times = [1, 3, 5, 10, 30] + last_exception = Exception("Bug while processing hotplug event.") for attempt, wait in enumerate(wait_times): LOG.debug( "subsystem=%s update attempt %s/%s", @@ -231,7 +232,7 @@ def handle_hotplug(hotplug_init: Init, devpath, subsystem, udevaction): time.sleep(wait) last_exception = e else: - raise last_exception # type: ignore + raise last_exception def handle_args(name, args): |