From d0baeec779a85a28db7644fa84c3b20be51769a4 Mon Sep 17 00:00:00 2001 From: shivam-deepcompute Date: Thu, 21 Dec 2017 05:19:18 +0100 Subject: [PATCH] enhanced basescript functionality , args = None, and changed version to 0.1.15 --- basescript/basescript.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/basescript/basescript.py b/basescript/basescript.py index 8752c12..fce837d 100644 --- a/basescript/basescript.py +++ b/basescript/basescript.py @@ -28,7 +28,7 @@ class BaseScript(object): # periodic interval to dump stats DUMP_STATS_INTERVAL = timedelta(seconds=1) - def __init__(self): + def __init__(self, args=None): # argparse parser obj self.parser = argparse.ArgumentParser(description=self.DESC) self.define_baseargs(self.parser) @@ -40,7 +40,7 @@ def __init__(self): self.define_args(self.subcommand_run) - self.args = self.parser.parse_args() + self.args = self.parser.parse_args(args=args) self.hostname = socket.gethostname() self.log = self.init_logger() diff --git a/setup.py b/setup.py index 71135c7..6697e04 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def get_long_description(): long_description = get_long_description() -version = '0.1.14' +version = '0.1.15' setup( name="basescript", version=version,