mirror of
https://github.com/9001/copyparty.git
synced 2025-10-04 10:19:21 +02:00
dist: strip some pointless code
This commit is contained in:
parent
44f2b63e43
commit
f1646b96ca
5 changed files with 26 additions and 3 deletions
|
@ -61,11 +61,21 @@ def uh2(fp):
|
|||
# remove expensive imports too
|
||||
lns = []
|
||||
on = True
|
||||
on2 = True
|
||||
for ln in cs.split("\n"):
|
||||
if ln.startswith("if True:"):
|
||||
on = False
|
||||
continue
|
||||
|
||||
if ln.endswith("# !rm.yes>"):
|
||||
on2 = False
|
||||
continue
|
||||
|
||||
if not on2:
|
||||
if ln.endswith("# !rm.no>"):
|
||||
on2 = True
|
||||
continue
|
||||
|
||||
if not on and (not ln.strip() or ln.startswith(" ")):
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue