Permalink
Browse files

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

  • Loading branch information...
gregneagle committed Apr 19, 2018
1 parent 7ec9402 commit 6cf7138c7c5203f376bbe2e16088b33e3608e85f
Showing with 6 additions and 0 deletions.
  1. +6 −0 code/client/munkiimport
@@ -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()

0 comments on commit 6cf7138

Please sign in to comment.