mirror of
https://github.com/gryf/wicd.git
synced 2025-12-19 12:28:08 +01:00
The exit status should indicate whether or not the connection was successful
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user