Skip to content

Commit cc647e0

Browse files
committed
add module namespace
Fixes: $ vault_from_gpg_agent.py Traceback (most recent call last): File "/usr/local/bin/vault_from_gpg_agent.py", line 96, in <module> main() File "/usr/local/bin/vault_from_gpg_agent.py", line 92, in main get_passphrase(gpg_agent, my_path, cache_id) File "/usr/local/bin/vault_from_gpg_agent.py", line 53, in get_passphrase description = urllib.quote( AttributeError: module 'urllib' has no attribute 'quote'
1 parent f9ff042 commit cc647e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vault_from_gpg_agent.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@
3131
import subprocess
3232
import sys
3333
import urllib
34+
import urllib.parse
3435
import os.path
3536
import hashlib
3637
import base64
3738
import argparse
3839

3940

4041
def get_passphrase(gpg_agent, my_path, cache_id):
41-
description = urllib.quote(
42+
description = urllib.parse.quote(
4243
"Please enter the ansible vault password for %s" % (my_path,))
4344
command = "GET_PASSPHRASE %s X X %s\n" % (cache_id, description)
4445
stdout = gpg_agent.communicate(command)[0]

0 commit comments

Comments
 (0)