projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3d34235
)
Add configuration to -v output
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 11 Mar 2013 23:10:05 +0000
(
00:10
+0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 11 Mar 2013 23:10:05 +0000
(
00:10
+0100)
youtube_dl/__init__.py
patch
|
blob
|
history
diff --git
a/youtube_dl/__init__.py
b/youtube_dl/__init__.py
index 3983e2f0e72dfa9f28cefbd7d7c5a772dd24505c..8a7aab7acd0b521a9b15fd03022f4934948ecb69 100644
(file)
--- a/
youtube_dl/__init__.py
+++ b/
youtube_dl/__init__.py
@@
-274,12
+274,20
@@
def parseOpts():
xdg_config_home = os.environ.get('XDG_CONFIG_HOME')
if xdg_config_home:
xdg_config_home = os.environ.get('XDG_CONFIG_HOME')
if xdg_config_home:
- userConf = os.path.join(xdg_config_home, 'youtube-dl.conf')
+ userConf
File
= os.path.join(xdg_config_home, 'youtube-dl.conf')
else:
else:
- userConf = os.path.join(os.path.expanduser('~'), '.config', 'youtube-dl.conf')
- argv = _readOptions('/etc/youtube-dl.conf') + _readOptions(userConf) + sys.argv[1:]
+ userConfFile = os.path.join(os.path.expanduser('~'), '.config', 'youtube-dl.conf')
+ systemConf = _readOptions('/etc/youtube-dl.conf')
+ userConf = _readOptions(userConfFile)
+ commandLineConf = sys.argv[1:]
+ argv = systemConf + userConf + commandLineConf
opts, args = parser.parse_args(argv)
opts, args = parser.parse_args(argv)
+ if opts.verbose:
+ print(u'[debug] System config: ' + repr(systemConf))
+ print(u'[debug] User config: ' + repr(userConf))
+ print(u'[debug] Command-line args: ' + repr(commandLineConf))
+
return parser, opts, args
def _real_main():
return parser, opts, args
def _real_main():