Only patch sarge's async on python 2
This commit is contained in:
1 parent
db8d420860
commit
ac129a2576
2 files changed
+7
-3
No files matched your search
@@ -595,8 +595,8 @@ def main():
|
||||
# cut off stuff from the beginning
|
||||
args = args[-1 * sys_args_length:] if sys_args_length else []
|
||||
|
||||
from octoprint.util.fixes import fix_sarge_async
|
||||
fix_sarge_async()
|
||||
from octoprint.util.fixes import patch_sarge_async_on_py2
|
||||
patch_sarge_async_on_py2()
|
||||
|
||||
from octoprint.cli import octo
|
||||
octo(args=args, prog_name="octoprint", auto_envvar_prefix="OCTOPRINT")
|
||||
|
||||
@@ -7,8 +7,12 @@ __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agp
|
||||
|
||||
import functools
|
||||
import warnings
|
||||
import sys
|
||||
|
||||
def patch_sarge_async_on_py2():
|
||||
if sys.version_info[0] >= 3:
|
||||
return
|
||||
|
||||
def fix_sarge_async():
|
||||
def move_async(f):
|
||||
@functools.wraps(f)
|
||||
def decorated_function(*args, **kwargs):
|
||||
|
||||
Reference in new issue
Block a user