Skip to content

Commit

Permalink
Removed extra newline
Browse files Browse the repository at this point in the history
From Python 3 docs, [print()](https://docs.python.org/3/library/functions.html#print) accepts a end keyword argument, which determines the last character to be printed, setting it to `''` empty string to prevent extra newlines.
  • Loading branch information
bernardoduarte authored and ubuntu committed Jul 30, 2020
1 parent d1a04cb commit d2c8ca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conda_env/cli/main_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def execute(args, parser):
env.add_channels(args.channel)

if args.file is None:
stdout_json(env.to_dict()) if args.json else print(env.to_yaml())
stdout_json(env.to_dict()) if args.json else print(env.to_yaml(), end='')
else:
fp = open(args.file, 'wb')
env.to_dict(stream=fp) if args.json else env.to_yaml(stream=fp)
Expand Down

0 comments on commit d2c8ca0

Please sign in to comment.