131 break |
131 break |
132 if len(sys.argv) > 1: |
132 if len(sys.argv) > 1: |
133 client.processArgs(sys.argv[1:]) |
133 client.processArgs(sys.argv[1:]) |
134 sys.exit(0) |
134 sys.exit(0) |
135 elif res < 0: |
135 elif res < 0: |
136 print("eric6: {0}".format(client.errstr())) # __IGNORE_WARNING__ |
136 print("eric6: {0}".format(client.errstr())) |
|
137 # __IGNORE_WARNING_M801__ |
137 sys.exit(res) |
138 sys.exit(res) |
138 |
139 |
139 |
140 |
140 def excepthook(excType, excValue, tracebackobj): |
141 def excepthook(excType, excValue, tracebackobj): |
141 """ |
142 """ |
192 if sys.version_info[0] == 2: |
193 if sys.version_info[0] == 2: |
193 notice = notice.encode(sys.stdout.encoding, 'replace') |
194 notice = notice.encode(sys.stdout.encoding, 'replace') |
194 msg = msg.encode(sys.stdout.encoding, 'replace') |
195 msg = msg.encode(sys.stdout.encoding, 'replace') |
195 versionInfo = versionInfo.encode(sys.stdout.encoding, 'replace') |
196 versionInfo = versionInfo.encode(sys.stdout.encoding, 'replace') |
196 warning = notice + msg + versionInfo |
197 warning = notice + msg + versionInfo |
197 print(warning) # __IGNORE_WARNING__ |
198 print(warning) # __IGNORE_WARNING_M801__ |
198 else: |
199 else: |
199 warning = notice + msg + versionInfo |
200 warning = notice + msg + versionInfo |
200 # Escape &<> otherwise it's not visible in the error dialog |
201 # Escape &<> otherwise it's not visible in the error dialog |
201 warning = xml.sax.saxutils.escape(warning) |
202 warning = xml.sax.saxutils.escape(warning) |
202 if sys.version_info[0] == 2: |
203 if sys.version_info[0] == 2: |