fix more formatting
@@ -7,6 +7,7 @@ import threading
import time
from docker.errors import DockerException
+from npyscreen import notify_confirm
from vent.api.actions import Action
from vent.helpers.meta import Containers
@@ -156,7 +157,7 @@ class MainForm(npyscreen.FormBaseNewWithMenus):
kwargs={"action":"install"})
popup(original_images, "images", thr,
'Please wait, installing core containers...')
- npyscreen.notify_confirm("Done installing core containers.",
+ notify_confirm("Done installing core containers.",
title='Installed core containers')
elif action == 'build':
self.parentApp.change_form('BUILDCORETOOLS')
@@ -249,8 +250,7 @@ class MainForm(npyscreen.FormBaseNewWithMenus):
try:
d_cli = docker.from_env()
except Exception as e: # pragma: no cover
- npyscreen.notify_confirm("Error connecting to Docker: "
- + repr(e))
+ notify_confirm("Error connecting to Docker: " + repr(e))
self.exit()
# remove containers
@@ -260,8 +260,8 @@ class MainForm(npyscreen.FormBaseNewWithMenus):
for c in list:
c.remove(force=True)
except Exception as e: # pragma: no cover
- npyscreen.notify_confirm("Error deleting Vent containers: "
- + repr(e))
+ notify_confirm("Error deleting Vent containers: " +
+ repr(e))
failed = True
# remove images
@@ -271,8 +271,7 @@ class MainForm(npyscreen.FormBaseNewWithMenus):
for i in list:
d_cli.images.remove(image=i.id, force=True)
except Exception as e: # pragma: no cover
- npyscreen.notify_confirm("Error deleting Vent images: "
- + repr(e))
+ notify_confirm("Error deleting Vent images: " + repr(e))
failed = True
# remove .vent folder
@@ -280,12 +279,11 @@ class MainForm(npyscreen.FormBaseNewWithMenus):
shutil.rmtree(os.path.join(os.path.expanduser('~'),
'.vent'))
except Exception as e: # pragma: no cover
- npyscreen.notify_confirm("Error deleting Vent data: "
- + repr(e))
+ notify_confirm("Error deleting Vent data: " + repr(e))
failed = True
if not failed:
- npyscreen.notify_confirm("Vent reset complete. "
+ notify_confirm("Vent reset complete. "
"Press OK to exit Vent Manager console.")
self.exit()
elif action == "upgrade":
@@ -298,7 +296,7 @@ class MainForm(npyscreen.FormBaseNewWithMenus):
try:
self.api_action = Action()
except DockerException as de: # pragma: no cover
- npyscreen.notify_confirm(str(de),
+ notify_confirm(str(de),
title="Docker Error",
form_color='DANGER',
wrap=True)
