From 3d3f2b535b6fc638b102ba132a9eb9879160c643 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Tue, 14 May 2019 07:42:10 -0700 Subject: [PATCH] Fix bug, encoded deviceId not included in output (#924) --- src/gam.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gam.py b/src/gam.py index 39cb22a7..9e4b14ed 100755 --- a/src/gam.py +++ b/src/gam.py @@ -11895,12 +11895,13 @@ def doPrintMobileDevices(): appDetails.append('') applications.append('-'.join(appDetails)) row[attrib] = delimiter.join(applications) - elif attrib == 'deviceId': - row[attrib] = mobile[attrib].encode('unicode-escape').decode(UTF8) else: if attrib not in titles: titles.append(attrib) - row[attrib] = mobile[attrib] + if attrib != 'deviceId': + row[attrib] = mobile[attrib] + else: + row[attrib] = mobile[attrib].encode('unicode-escape').decode(UTF8) csvRows.append(row) sortCSVTitles(['resourceId', 'deviceId', 'serialNumber', 'name', 'email', 'status'], titles) writeCSVfile(csvRows, titles, 'Mobile', todrive)