optimize webcolor get

This commit is contained in:
Jay Lee
2017-11-03 20:10:15 -04:00
parent 6a90a76fb1
commit d072172ff5

View File

@@ -7353,9 +7353,7 @@ def doUpdateTeamDrive(users):
} }
i += 5 i += 5
elif sys.argv[i].lower() == u'color': elif sys.argv[i].lower() == u'color':
body[u'colorRgb'] = sys.argv[i+1] body[u'colorRgb'] = WEBCOLOR_MAP.get(sys.argv[i+1], sys.argv[i+1])
if body[u'colorRgb'] in WEBCOLOR_MAP.keys():
body[u'colorRgb'] = WEBCOLOR_MAP[body[u'colorRgb']]
i += 2 i += 2
else: else:
print u'ERROR: %s is not a valid argument for "gam <users> update drivefile"' print u'ERROR: %s is not a valid argument for "gam <users> update drivefile"'