mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
463 B
Python
19 lines
463 B
Python
5 years ago
|
"""Prevent files from being added to directories that are now obsolete."""
|
||
|
from __future__ import (absolute_import, division, print_function)
|
||
|
__metaclass__ = type
|
||
|
|
||
|
import os
|
||
|
import sys
|
||
|
|
||
|
|
||
|
def main():
|
||
|
"""Main entry point."""
|
||
|
paths = sys.argv[1:] or sys.stdin.read().splitlines()
|
||
|
|
||
|
for path in paths:
|
||
|
print('%s: directory "%s/" is obsolete and should not contain any files' % (path, os.path.dirname(path)))
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
main()
|