Skip to content

Commit

Permalink
org_status.py: Fix export repo list bug
Browse files Browse the repository at this point in the history
Closes #31
  • Loading branch information
ksdme committed Nov 12, 2018
1 parent ec0972c commit daa0bdf
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions org_status/org_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,12 @@ 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)
verbose(f'exported to {export_file}')
else:
verbose(f'exporting failed {export_file}')

0 comments on commit daa0bdf

Please sign in to comment.