| @@ -38,6 +38,7 @@ from noise.connection import NoiseConnection, Keypair | |||||
| import argparse | import argparse | ||||
| import asyncio | import asyncio | ||||
| import base64 | import base64 | ||||
| import functools | |||||
| import os.path | import os.path | ||||
| import shutil | import shutil | ||||
| import socket | import socket | ||||
| @@ -250,7 +251,9 @@ def parsesockstr(sockstr): | |||||
| return proto, args | return proto, args | ||||
| async def connectsockstr(sockstr): | async def connectsockstr(sockstr): | ||||
| '''Wrapper for asyncio.open_*_connection.''' | |||||
| '''Wrapper for asyncio.open_*_connection. | |||||
| For the format of sockstr, please see parsesockstr.''' | |||||
| proto, args = parsesockstr(sockstr) | proto, args = parsesockstr(sockstr) | ||||
| @@ -264,7 +267,7 @@ async def connectsockstr(sockstr): | |||||
| return reader, writer | return reader, writer | ||||
| async def listensockstr(sockstr, cb): | async def listensockstr(sockstr, cb): | ||||
| '''Wrapper for asyncio.start_x_server. | |||||
| '''Wrapper for asyncio.start_*_server. | |||||
| For the format of sockstr, please see parsesockstr. | For the format of sockstr, please see parsesockstr. | ||||
| @@ -505,6 +508,7 @@ async def NoiseForwarder(mode, encrdrwrr, connvalid, priv_key, pub_key=None): | |||||
| # Slightly modified to timeout and to print trace back when canceled. | # Slightly modified to timeout and to print trace back when canceled. | ||||
| # This makes it easier to figure out what "froze". | # This makes it easier to figure out what "froze". | ||||
| def async_test(f): | def async_test(f): | ||||
| @functools.wraps(f) | |||||
| def wrapper(*args, **kwargs): | def wrapper(*args, **kwargs): | ||||
| async def tbcapture(): | async def tbcapture(): | ||||
| try: | try: | ||||