Skip to content

Commit

Permalink
Merge pull request ksdme#32 from ksdme/ksdme/bug
Browse files Browse the repository at this point in the history
org_status.py: Fix export repo list bug
  • Loading branch information
ksdme authored Nov 12, 2018
2 parents ec0972c + a3e0a56 commit a805a81
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions org_status/org_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ def main():
org_status = aggregate_org_status(org_host, threads=args.threads)
present_status(org_status, args.no_color)

export_data = encode_repo_list(all_repositories,
args.format,
styled)
export_file = path.abspath(args.export_repos)
if args.export_repos:
export_data = encode_repo_list(all_repositories, args.format, styled)
export_file = path.abspath(args.export_repos)

if export_data is not None:
write_data_to_file(export_data, export_file, styled, verbose)
if len(all_repositories) > 0:
write_data_to_file(export_data, export_file, styled, verbose)
else:
verbose(f'exporting failed {export_file}')

0 comments on commit a805a81

Please sign in to comment.