-
Notifications
You must be signed in to change notification settings - Fork 988
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop2' into release/2.0-beta
- Loading branch information
Showing
223 changed files
with
3,047 additions
and
2,651 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +0,0 @@ | ||
import functools | ||
import os | ||
|
||
from conans.util.tracer import log_conan_api_call | ||
|
||
|
||
def api_method(f): | ||
"""Useful decorator to manage Conan API methods""" | ||
|
||
@functools.wraps(f) | ||
def wrapper(subapi, *args, **kwargs): | ||
try: # getcwd can fail if Conan runs on an non-existing folder | ||
old_curdir = os.getcwd() | ||
except EnvironmentError: | ||
old_curdir = None | ||
|
||
try: | ||
# FIXME: Fix this hack if we want to keep the action recorder | ||
subapi_name = str(subapi.__class__.__name__).replace("API", "").lower() | ||
log_conan_api_call("{}.{}".format(subapi_name, f.__name__), kwargs) | ||
return f(subapi, *args, **kwargs) | ||
finally: | ||
if old_curdir: | ||
os.chdir(old_curdir) | ||
|
||
return wrapper | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.