Some informational output from the plugin, do not overwrite __init__.py
This commit is contained in:
parent
d43d5af5ce
commit
eff9021529
@ -363,10 +363,20 @@ def generate_code(request, response):
|
|||||||
inits.add(base)
|
inits.add(base)
|
||||||
|
|
||||||
for base in inits:
|
for base in inits:
|
||||||
|
name = os.path.join(base, "__init__.py")
|
||||||
|
|
||||||
|
if os.path.exists(name):
|
||||||
|
# Never overwrite inits as they may have custom stuff in them.
|
||||||
|
continue
|
||||||
|
|
||||||
init = response.file.add()
|
init = response.file.add()
|
||||||
init.name = os.path.join(base, "__init__.py")
|
init.name = name
|
||||||
init.content = b""
|
init.content = b""
|
||||||
|
|
||||||
|
filenames = sorted([f.name for f in response.file])
|
||||||
|
for fname in filenames:
|
||||||
|
print(f"Writing {fname}", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""The plugin's main entry point."""
|
"""The plugin's main entry point."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user