Since gajim-remote is a user script and the output of which is often parsed I think
it unwise to include the "inconsistent use of tabs and spaces in indentation" warning. Filtering stderr works, but may also filter out useful info.
This commit is contained in:
parent
a39d946bee
commit
39b2c854d4
|
@ -49,7 +49,7 @@ except:
|
|||
def send_error(error_message):
|
||||
'''Writes error message to stderr and exits'''
|
||||
print >> sys.stderr, error_message.encode(PREFERRED_ENCODING)
|
||||
sys.exit()
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
import dbus
|
||||
|
@ -226,7 +226,7 @@ class GajimRemote:
|
|||
print self.help_on_command(sys.argv[2]).encode(PREFERRED_ENCODING)
|
||||
else:
|
||||
print self.compose_help().encode(PREFERRED_ENCODING)
|
||||
sys.exit()
|
||||
sys.exit(0)
|
||||
|
||||
self.init_connection()
|
||||
self.check_arguments()
|
||||
|
@ -235,7 +235,12 @@ class GajimRemote:
|
|||
if self.argv_len < 3:
|
||||
send_error(_('Missing argument "contact_jid"'))
|
||||
|
||||
try:
|
||||
res = self.call_remote_method()
|
||||
except exceptions.ServiceNotAvailable:
|
||||
# At this point an error message has already been displayed
|
||||
sys.exit(1)
|
||||
else:
|
||||
self.print_result(res)
|
||||
|
||||
def print_result(self, res):
|
||||
|
|
Loading…
Reference in New Issue