Browse Source

Allow shorthand method for creating an option-less parser.

This is mostly just intended to make a simple filter example shorter.
tags/nilmtools-1.1.7^0
Jim Paris 8 years ago
parent
commit
8ab31eafc2
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/filter.py

+ 4
- 1
src/filter.py View File

@@ -67,7 +67,7 @@ def get_stream_info(client, path):

class Filter(object):

def __init__(self):
def __init__(self, parser_description = None):
self._parser = None
self._client_src = None
self._client_dest = None
@@ -78,6 +78,9 @@ class Filter(object):
self.end = None
self.interhost = False
self.force_metadata = False
if parser_description is not None:
self.setup_parser(parser_description)
self.parse_args()

@property
def client_src(self):


Loading…
Cancel
Save