Skip to content

Commit

Permalink
Disable the --browser-auth option
Browse files Browse the repository at this point in the history
  • Loading branch information
davesteele committed Nov 11, 2017
1 parent e631244 commit b884991
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
34 changes: 34 additions & 0 deletions debian/patches/disable-browser-auth.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Description: Disable the --browser-auth option
The browser auth code is failing with a missing import for
QtWebKit. That module is not available packaged for QT4 and
python3. Disable until shoogle is upgraded to QT5.
Author: David Steele <steele@debian.org>
Bug-Vendor: https://github.com/tokland/shoogle/issues/9
Last-Update: 2017-11-11

--- a/shoogle/commands/execute.py
+++ b/shoogle/commands/execute.py
@@ -20,8 +20,6 @@
help="Use a client secret JSON file")
parser.add_argument('-f', '--media-file', metavar="PATH",
help='File to use for media-related methods')
- parser.add_argument('--browser-auth', action="store_true",
- help="Use a browser to authentify")
parser.add_argument('--credentials-file',
metavar="PATH", help="Select credentials file to use")
parser.add_argument('--credentials-profile', default="default",
@@ -74,12 +72,8 @@
raise common.ShoogleException(msg)
else:
credentials_path = common.get_credentials_path(scopes, options.credentials_profile)
- if options.browser_auth:
- from shoogle.auth import browser
- get_code = auth.browser.get_code
- else:
- from shoogle.auth import console
- get_code = auth.console.get_code
+ from shoogle.auth import console
+ get_code = auth.console.get_code
client_secret = options.client_secret_file
return auth.get_credentials(client_secret, credentials_path, scopes, get_code)
else:
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
python3-shebang.patch
shoopath.patch
disable-browser-auth.patch
7 changes: 1 addition & 6 deletions debian/shoogle.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ shoogle -- command-line access to the Google API

`shoogle` `show` [`--debug-request-level`] [`--debug-response-level`] [&lt;API-PATH&gt;]

`shoogle` `execute` [`-c <CLIENT-SECRET-FILE>`] [`--credentials-file CREDENTIALS-FILE` | `--credentials-profile CREDENTIALS-PROFILE>`] [`-f <path>`] [`--browser-auth`] &lt;API-PATH&gt; &lt;JSON-FILE&gt;
`shoogle` `execute` [`-c <CLIENT-SECRET-FILE>`] [`--credentials-file CREDENTIALS-FILE` | `--credentials-profile CREDENTIALS-PROFILE>`] [`-f <path>`] &lt;API-PATH&gt; &lt;JSON-FILE&gt;
# DESCRIPTION


Expand Down Expand Up @@ -60,11 +60,6 @@ can be used to discover interfaces and methods, and to execute them.
**-f &lt;path&gt;**, **--media-file &lt;path&gt;**
: File to use for media-related operations.

&nbsp;
**--browser-auth**
: Use the web browser to complete OAuth2 authentication. By default, the
console is used. Browser authentication requires the *python3-pyqt4* and *python3-pyqt5.qtwebkit* packages.

&nbsp;
**--credentials-file &lt;CREDENTIALS-FILE&gt;**
: Select a specific set of established OAuth2 credentials. See CREDENTIALS-FILE for details.
Expand Down

0 comments on commit b884991

Please sign in to comment.