[Reportbug-commits] [reportbug] 25/32: use shlex.quote() in py3k

Sandro Tosi morph at moszumanska.debian.org
Thu Dec 1 01:36:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository reportbug.

commit ba83e0d37565ff0241221b848770efa6ca4f20ee
Author: Sandro Tosi <morph at debian.org>
Date:   Wed Nov 30 19:56:56 2016 -0500

    use shlex.quote() in py3k
---
 reportbug/urlutils.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/reportbug/urlutils.py b/reportbug/urlutils.py
index 310a69a..f8e4cfa 100644
--- a/reportbug/urlutils.py
+++ b/reportbug/urlutils.py
@@ -27,7 +27,7 @@ import urllib.request, urllib.error, urllib.parse
 import getpass
 import re
 import socket
-import subprocess
+import shlex
 import os
 import sys
 import webbrowser
@@ -173,7 +173,7 @@ def open_url(url, http_proxy=None, timeout=60):
 
 def launch_browser(url):
     if not os.system('command -v xdg-open >/dev/null 2>&1'):
-        cmd = 'xdg-open' + subprocess.mkarg(url)
+        cmd = 'xdg-open ' + shlex.quote(url)
         os.system(cmd)
         return
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git



More information about the Reportbug-commits mailing list