projects
/
vpproxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b23938d
)
Сделана корректная обработка "неаккуратных" файлов с пропущенными кавычками вокруг...
author
Roman Bazalevsky
<rvb@rvb.name>
Mon, 2 Nov 2015 11:59:52 +0000
(14:59 +0300)
committer
Roman Bazalevsky
<rvb@rvb.name>
Mon, 2 Nov 2015 11:59:52 +0000
(14:59 +0300)
plugins/modules/M3uParser.py
patch
|
blob
|
history
diff --git
a/plugins/modules/M3uParser.py
b/plugins/modules/M3uParser.py
index e946ec27bfa86689b4eb8f5b675986e7f2bbb39e..5bee611475d247073a6a0023d2afe938d7d8e321 100644
(file)
--- a/
plugins/modules/M3uParser.py
+++ b/
plugins/modules/M3uParser.py
@@
-51,8
+51,15
@@
def parseM3U(infile):
attrstr=attrstr.strip()
key,tail=attrstr.split('=',1)
- tail=tail[1:]
- value,attrstr=tail.split('"',1)
+ if tail[0]=='\"':
+ tail=tail[1:]
+ value,attrstr=tail.split('"',1)
+ else:
+ try:
+ value,attrstr=tail.split(' ',1)
+ except ValueError:
+ value=tail
+ attrstr=''
attrstr=attrstr.strip()
attrs[key]=value