Skip to content

Commit 5c5a15e

Browse files
committed
ignore server errors IF server is offline
1 parent c22ef48 commit 5c5a15e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cli/commands/analyze.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,22 @@ def send_to_server(data):
3939
print("✓ New analysis sent to server")
4040
return True
4141
else:
42-
print(f"⚠ Server responded with status {response.status_code}", file=sys.stderr)
42+
# print(f"⚠ Server responded with status {response.status_code}", file=sys.stderr)
4343
return False
4444

4545
except requests.exceptions.ConnectionError:
46-
print("⚠ Could not connect to server - make sure it's running on localhost:3000", file=sys.stderr)
46+
# print("⚠ Could not connect to server - make sure it's running on localhost:3000", file=sys.stderr)
4747
return False
4848
except requests.exceptions.Timeout:
49-
print("⚠ Server request timed out", file=sys.stderr)
49+
# print("⚠ Server request timed out", file=sys.stderr)
5050
return False
5151
except Exception as e:
52-
print(f"⚠ Error sending to server: {e}", file=sys.stderr)
52+
# Linha para debugar erros, descomente se precisar:
53+
# print(f"⚠ Error sending to server: {e}", file=sys.stderr)
5354
return False
5455

5556

57+
5658
def analyze_command(file, all, json_output, LANG_FILE):
5759
"""
5860
Analyze the given file.

0 commit comments

Comments
 (0)