# HG changeset patch # User Jeff Hammel # Date 1438909595 25200 # Node ID af7b427b3b83294080a613770857fb96de7373ed # Parent 12f0be02e9cca31a2a7247e9bb78150040ece795 print config option diff -r 12f0be02e9cc -r af7b427b3b83 python/dlna.py --- a/python/dlna.py Wed Aug 05 08:44:23 2015 -0700 +++ b/python/dlna.py Thu Aug 06 18:06:35 2015 -0700 @@ -31,6 +31,9 @@ parser.add_argument('-v', '--videos', dest='videos', nargs='+', help="videos") parser.add_argument('audio', nargs='+') + parser.add_argument('--print', '--print-config', dest='print_config', + action='store_true', default=False, + help="write config to stdout and exit") options = parser.parse_args(args) # dlna location @@ -50,6 +53,9 @@ config = '\n'.join(['{}={}'.format(*line) for line in lines]) print (config) + if options.print_config: + parser.exit() + fd, name = tempfile.mkstemp() os.write(fd, config) os.close(fd)