From bb204fa86806cb9fa4cdc4b076d4f0db4fc6388f Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Fri, 30 Jun 2017 16:08:28 -0400 Subject: [PATCH] sort pring org results --- src/gam.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gam.py b/src/gam.py index c82cc77c..7538d2d9 100755 --- a/src/gam.py +++ b/src/gam.py @@ -9518,6 +9518,8 @@ def doPrintOrgs(): if title not in print_order: print_order.append(title) titles = sorted(titles, key=print_order.index) + # sort results similar to how they list in admin console + csvRows.sort(key=lambda x: x[u'orgUnitPath'].lower(), reverse=False) writeCSVfile(csvRows, titles, u'Orgs', todrive) def doPrintAliases():