comparison frontends/src/jp/constants.py @ 2550:1d754bc14381

jp (base): new confirmOrQuit helper method to ask confirmation to user, and quit if he cancel
author Goffi <goffi@goffi.org>
date Sat, 31 Mar 2018 18:21:56 +0200
parents dcc77f23e370
children 38e1e29c48e9
comparison
equal deleted inserted replaced
2549:f685ad80ee98 2550:1d754bc14381
57 A_DIRECTORY = A.BOLD + A.FG_CYAN 57 A_DIRECTORY = A.BOLD + A.FG_CYAN
58 A_FILE = A.FG_WHITE 58 A_FILE = A.FG_WHITE
59 59
60 # exit codes 60 # exit codes
61 EXIT_OK = 0 61 EXIT_OK = 0
62 EXIT_ERROR = 1 # generic error, when nothing else match 62 EXIT_ERROR = 1 # generic error, when nothing else match
63 EXIT_BAD_ARG = 2 # arguments given by user are bad 63 EXIT_BAD_ARG = 2 # arguments given by user are bad
64 EXIT_BRIDGE_ERROR = 3 # can't connect to bridge 64 EXIT_BRIDGE_ERROR = 3 # can't connect to bridge
65 EXIT_BRIDGE_ERRBACK = 4 # something went wrong when calling a bridge method 65 EXIT_BRIDGE_ERRBACK = 4 # something went wrong when calling a bridge method
66 EXIT_NOT_FOUND = 16 # an item required by a command was not found 66 EXIT_NOT_FOUND = 16 # an item required by a command was not found
67 EXIT_DATA_ERROR = 17 # data needed for a command is invalid 67 EXIT_DATA_ERROR = 17 # data needed for a command is invalid
68 EXIT_FILE_NOT_EXE = 126 # a file to be executed was found, but it was not an executable utility (cf. man 1 exit) 68 EXIT_USER_CANCELLED = 20 # user cancelled action
69 EXIT_CMD_NOT_FOUND = 127 # a utility to be executed was not found (cf. man 1 exit) 69 EXIT_FILE_NOT_EXE = 126 # a file to be executed was found, but it was not an executable utility (cf. man 1 exit)
70 EXIT_SIGNAL_INT = 128 # a command was interrupted by a signal (cf. man 1 exit) 70 EXIT_CMD_NOT_FOUND = 127 # a utility to be executed was not found (cf. man 1 exit)
71 EXIT_SIGNAL_INT = 128 # a command was interrupted by a signal (cf. man 1 exit)