Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sourcery refactored master branch #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions utils/ohos/configuration/build_thirdparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def cmd_exec(command):
proc.wait()
ret_code = proc.returncode
if ret_code != 0:
raise Exception("{} failed, return code is {}".format(cmd, ret_code))
raise Exception(f"{cmd} failed, return code is {ret_code}")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function cmd_exec refactored with the following changes:


def main():
parser = argparse.ArgumentParser()
Expand All @@ -23,9 +23,8 @@ def main():
parser.add_argument('--enable', help='enable python.', nargs='*')
args = parser.parse_args()

if args.enable:
if args.enable[0] == 'false':
return
if args.enable and args.enable[0] == 'false':
return
Comment on lines -26 to +27
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function main refactored with the following changes:


if args.path:
curr_dir = os.getcwd()
Expand Down