Skip to content

Commit

Permalink
move exit code contants to separate module
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@13080 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 23, 2016
1 parent 0dbfe89 commit 5532247
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 19 deletions.
20 changes: 4 additions & 16 deletions src/xpra/client/client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,10 @@
from xpra.util import flatten_dict, typedict, updict, xor, repr_ellipsized, nonl, disconnect_is_an_error, dump_all_frames
from xpra.net.file_transfer import FileTransferHandler

EXIT_OK = 0
EXIT_CONNECTION_LOST = 1
EXIT_TIMEOUT = 2
EXIT_PASSWORD_REQUIRED = 3
EXIT_PASSWORD_FILE_ERROR = 4
EXIT_INCOMPATIBLE_VERSION = 5
EXIT_ENCRYPTION = 6
EXIT_FAILURE = 7
EXIT_SSH_FAILURE = 8
EXIT_PACKET_FAILURE = 9
EXIT_MMAP_TOKEN_FAILURE = 10
EXIT_NO_AUTHENTICATION = 11
EXIT_UNSUPPORTED = 12
EXIT_REMOTE_ERROR = 13
EXIT_INTERNAL_ERROR = 14
EXIT_FILE_TOO_BIG = 15
from xpra.exit_codes import (EXIT_OK, EXIT_CONNECTION_LOST, EXIT_TIMEOUT,
EXIT_PASSWORD_REQUIRED, EXIT_PASSWORD_FILE_ERROR, EXIT_INCOMPATIBLE_VERSION,
EXIT_ENCRYPTION, EXIT_FAILURE, EXIT_PACKET_FAILURE,
EXIT_NO_AUTHENTICATION, EXIT_INTERNAL_ERROR)


EXTRA_TIMEOUT = 10
Expand Down
4 changes: 2 additions & 2 deletions src/xpra/client/gobject_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import sys
from xpra.util import nonl, sorted_nicely, print_nested_dict, DONE
from xpra.os_util import bytestostr
from xpra.client.client_base import XpraClientBase, EXTRA_TIMEOUT, \
EXIT_TIMEOUT, EXIT_OK, EXIT_UNSUPPORTED, EXIT_REMOTE_ERROR, EXIT_FILE_TOO_BIG
from xpra.client.client_base import XpraClientBase, EXTRA_TIMEOUT
from xpra.exit_codes import (EXIT_OK, EXIT_TIMEOUT, EXIT_UNSUPPORTED, EXIT_REMOTE_ERROR, EXIT_FILE_TOO_BIG)

FLATTEN_INFO = int(os.environ.get("XPRA_FLATTEN_INFO", "1"))

Expand Down
4 changes: 3 additions & 1 deletion src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@

from xpra import __version__ as XPRA_VERSION
from xpra.gtk_common.gobject_util import no_arg_signal
from xpra.client.client_base import XpraClientBase, EXIT_TIMEOUT, EXIT_MMAP_TOKEN_FAILURE
from xpra.client.client_base import XpraClientBase
from xpra.exit_codes import (EXIT_TIMEOUT, EXIT_MMAP_TOKEN_FAILURE)
from xpra.client.client_tray import ClientTray
from xpra.client.keyboard_helper import KeyboardHelper
from xpra.platform.features import MMAP_SUPPORTED, SYSTEM_TRAY_SUPPORTED, CLIPBOARD_WANT_TARGETS, CLIPBOARD_GREEDY, CLIPBOARDS, REINIT_WINDOWS
Expand Down Expand Up @@ -69,6 +70,7 @@
def add_legacy_names(codecs):
return codecs


FAKE_BROKEN_CONNECTION = int(os.environ.get("XPRA_FAKE_BROKEN_CONNECTION", "0"))
PING_TIMEOUT = int(os.environ.get("XPRA_PING_TIMEOUT", "60"))
UNGRAB_KEY = os.environ.get("XPRA_UNGRAB_KEY", "Escape")
Expand Down
21 changes: 21 additions & 0 deletions src/xpra/exit_codes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This file is part of Xpra.
# Copyright (C) 2010-2016 Antoine Martin <antoine@devloop.org.uk>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

EXIT_OK = 0
EXIT_CONNECTION_LOST = 1
EXIT_TIMEOUT = 2
EXIT_PASSWORD_REQUIRED = 3
EXIT_PASSWORD_FILE_ERROR = 4
EXIT_INCOMPATIBLE_VERSION = 5
EXIT_ENCRYPTION = 6
EXIT_FAILURE = 7
#EXIT_SSH_FAILURE = 8
EXIT_PACKET_FAILURE = 9
EXIT_MMAP_TOKEN_FAILURE = 10
EXIT_NO_AUTHENTICATION = 11
EXIT_UNSUPPORTED = 12
EXIT_REMOTE_ERROR = 13
EXIT_INTERNAL_ERROR = 14
EXIT_FILE_TOO_BIG = 15

0 comments on commit 5532247

Please sign in to comment.