munkiimport: if no options or arguments are given, print usage

This commit is contained in:
Greg Neagle
2018-04-19 15:37:02 -07:00
parent c837176d19
commit 48d9c296b2

View File

@@ -260,6 +260,12 @@ def main():
sys.argv = [unicode(item, 'utf-8') for item in sys.argv]
options, arguments = parser.parse_args()
# there are a lot of valid combinations of option flags and arguments
# but if there are no option flags or arguments we should print usage
if len(sys.argv) == 1:
parser.print_usage()
exit(0)
if options.version:
print info.get_version()