aboutsummaryrefslogtreecommitdiff
path: root/devscripts
diff options
context:
space:
mode:
authorgcmalloc <gcmalloc@gmail.com>2012-12-07 21:59:59 +0100
committergcmalloc <gcmalloc@gmail.com>2012-12-07 22:01:02 +0100
commita9d2f7e8945abfb792b76ba551f568d3580c30a6 (patch)
treed127116264a5a9c982c1eee11f76134e9e6f24ac /devscripts
parent682407f2d5048cf034faf75b3e3611db31850f91 (diff)
making the script compatible with python3
Diffstat (limited to 'devscripts')
-rw-r--r--devscripts/bash_completion.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/devscripts/bash_completion.py b/devscripts/bash_completion.py
index 1cbfa8bec..704034f22 100644
--- a/devscripts/bash_completion.py
+++ b/devscripts/bash_completion.py
@@ -1,4 +1,9 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
+import os
+from os.path import dirname as dirn
+import sys
+
+sys.path.append(dirn(dirn((os.path.abspath(__file__)))))
import youtube_dl
BASH_COMPLETION_FILE = "youtube-dl.bash_completion"
@@ -14,7 +19,6 @@ def build_completion(opt_parser):
template = f.read()
with open(BASH_COMPLETION_FILE, "w") as f:
#just using the special char
- print opts_flag
filled_template = template.replace("{{flags}}", " ".join(opts_flag))
f.write(filled_template)