Simplify hashflag parsing
This commit is contained in:
parent
c0fbe963a5
commit
8d3255c46d
1 changed files with 1 additions and 6 deletions
|
@ -136,12 +136,7 @@ def get_hashflags(filename):
|
||||||
if not line.startswith("#"):
|
if not line.startswith("#"):
|
||||||
break
|
break
|
||||||
elif line.startswith("#--"):
|
elif line.startswith("#--"):
|
||||||
line_split = line.split(" ", 1)
|
hashflag, _, value = line.replace("#--", "", 1).partition(" ")
|
||||||
hashflag = line_split[0][3:]
|
|
||||||
value = None
|
|
||||||
|
|
||||||
if len(line_split) > 1:
|
|
||||||
value = line_split[1]
|
|
||||||
hashflags[hashflag] = value
|
hashflags[hashflag] = value
|
||||||
return hashflags.items()
|
return hashflags.items()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue