Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caucase
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
caucase
Commits
666c24cd
Commit
666c24cd
authored
Dec 14, 2018
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli.updater: Reduce verbosity when getting network errors.
Show the error message without a traceback.
parent
c91a8bb4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
caucase/cli.py
caucase/cli.py
+7
-4
No files found.
caucase/cli.py
View file @
666c24cd
...
@@ -28,7 +28,6 @@ import os
...
@@ -28,7 +28,6 @@ import os
import
socket
import
socket
import
struct
import
struct
import
sys
import
sys
import
traceback
from
cryptography
import
x509
from
cryptography
import
x509
from
cryptography.hazmat.backends
import
default_backend
from
cryptography.hazmat.backends
import
default_backend
from
.
import
exceptions
from
.
import
exceptions
...
@@ -70,10 +69,14 @@ class RetryingCaucaseClient(CaucaseClient):
...
@@ -70,10 +69,14 @@ class RetryingCaucaseClient(CaucaseClient):
httplib
.
LineTooLong
,
httplib
.
LineTooLong
,
httplib
.
UnknownProtocol
,
httplib
.
UnknownProtocol
,
httplib
.
IncompleteRead
,
httplib
.
IncompleteRead
,
)
:
)
as
exception
:
connection
.
close
()
# Resets HTTPConnection state machine.
connection
.
close
()
# Resets HTTPConnection state machine.
print
(
'Got a network error, retrying in a bit...'
)
# Note: repr(str(exception)) is nicer than repr(exception), without
traceback
.
print_exc
()
# letting non-printable characters through.
print
(
'Got a network error, retrying in a bit: %s: %r'
%
(
exception
.
__class__
.
__name__
,
str
(
exception
),
))
self
.
_until
(
datetime
.
datetime
.
now
()
+
datetime
.
timedelta
(
0
,
10
))
self
.
_until
(
datetime
.
datetime
.
now
()
+
datetime
.
timedelta
(
0
,
10
))
_cryptography_backend
=
default_backend
()
_cryptography_backend
=
default_backend
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment