Skip to content

Commit

Permalink
Added an option to clamservice command line tool to pass external con…
Browse files Browse the repository at this point in the history
…fig filename #67
  • Loading branch information
proycon committed Mar 14, 2018
1 parent 0ce0a9d commit 24fbcd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clam/clamservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2778,6 +2778,7 @@ def main():
parser.add_argument('-P','--pythonpath', type=str,help="Sets the $PYTHONPATH", action='store',required=False)
parser.add_argument('-b','--basicauth', help="Default to HTTP Basic Authentication on the development server (do not expose to the world without SSL)", action='store_true',required=False)
parser.add_argument('-v','--version',help="Version", action='version',version="CLAM version " + str(VERSION))
parser.add_argument('-c','--config', type=str,help="Path to external YAML configuration file to import", action='store',required=False)
parser.add_argument('settingsmodule', type=str, help='The webservice service configuration to be imported. This is a Python module path rather than a file path (for instance: clam.config.textstats), the configuration must be importable by Python. Add the path where it is located using --pythonpath if it can not be found.')
args = parser.parse_args()

Expand All @@ -2796,6 +2797,8 @@ def main():
PYTHONPATH = args.pythonpath
if 'basicauth' in args:
ASSUMESSL = True
if 'config' in args and args.config:
os.environ['CONFIGFILE'] = args.config #passed through the environment

settingsmodule = args.settingsmodule

Expand Down

0 comments on commit 24fbcd1

Please sign in to comment.