1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-24 23:22:27 +01:00

Merge "Ben the Pyrate 2014-08-19 The exit status should indicate whether or not the connection was successful"

Exit with a non-zero status (6) when a connection attempt does not succeed.
This commit is contained in:
Tom Van Braeckel
2014-12-11 13:41:56 +01:00

View File

@@ -25,6 +25,8 @@ from wicd.translations import _
misc.RenameProcess('wicd-cli')
exit_status = 0
if getattr(dbus, 'version', (0, 0, 0)) < (0, 80, 0):
import dbus.glib
else:
@@ -278,6 +280,8 @@ if options.connect:
print message()
last = next_
print "done!"
if status() != u'done':
exit_status = 6
op_performed = True
def str_properties(prop):
@@ -313,3 +317,5 @@ if options.save and options.network > -1:
if not op_performed:
print "No operations performed."
sys.exit(exit_status)