projects
/
vpproxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Корректная обработка ошибок при неправильном имени канала.
[vpproxy.git]
/
plugins
/
modules
/
M3uParser.py
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)
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
attrstr=attrstr.strip()
attrs[key]=value