Commit 90779a42 authored by Stavros Sachtouris's avatar Stavros Sachtouris Committed by Giorgos Korfiatis
Browse files

Use functools.wraps in ssl_fall_back decorator

parent 7be0894f
......@@ -17,6 +17,8 @@ import os
import threading
import logging
from functools import wraps
from agkyra.syncer.utils import join_path, ThreadSafeDict
from agkyra.syncer.database import SqliteFileStateDB
from agkyra.syncer.messaging import Messager
......@@ -52,6 +54,7 @@ def get_instance(elems):
def ssl_fall_back(method):
"""Catch an SSL error while executing a method, patch kamaki and retry"""
def wrap(self, *args, **kwargs):
return method(self, *args, **kwargs)
......@@ -62,8 +65,6 @@ def ssl_fall_back(method):
import certifi
return method(self, *args, **kwargs)
wrap.__name__ = method.__name__
wrap.__doc__ = method.__doc__
return wrap
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment