Bring back tools.run(), but only conditionally on gflags.
Add a warning that tools.run() is deprecated and will be removed in a future
version.
Reviewed in https://codereview.appspot.com/9772046/.
diff --git a/apiclient/sample_tools.py b/apiclient/sample_tools.py
index ff17b2b..ba6d754 100644
--- a/apiclient/sample_tools.py
+++ b/apiclient/sample_tools.py
@@ -85,7 +85,7 @@
storage = file.Storage(name + '.dat')
credentials = storage.get()
if credentials is None or credentials.invalid:
- credentials = tools.run(flow, storage, flags)
+ credentials = tools.run_flow(flow, storage, flags)
http = credentials.authorize(http = httplib2.Http())
# Construct a service object via the discovery service.