Skip to content

Commit

Permalink
added --noninteractive to clamnewproject #70
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Nov 2, 2018
1 parent 8302c36 commit dbd08e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion clam/clamnewproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@ def main():
parser.add_argument('-u','--forceurl', type=str,help="The full URL to access the webservice", action='store',required=False)
parser.add_argument('-U','--uwsgiport', type=int,help="UWSGI port to use for this webservice when deployed in production environments", action='store',default=8888,required=False)
parser.add_argument('-f','--force',help="Force use of a directory which already exists", action='store_true',required=False)
parser.add_argument('--noninteractive',help="Non-interactive mode, don't ask questions", action='store_true',required=False)
parser.add_argument('-v','--version',help="Version", action='version',version="CLAM version " + str(VERSION))
parser.add_argument('sysid',type=str, help='System ID')
args = parser.parse_args()

createvenv = False
if 'CONDA_PREFIX' in os.environ:
print("NOTICE: Anaconda detected")
elif 'VIRTUAL_ENV' not in os.environ:
elif 'VIRTUAL_ENV' not in os.environ and not args.noninteractive:
print("WARNING: You are not inside a Python Virtual Environment, using one is strongly recommended")
yn = None
while yn.strip().lower() not in ('y','yes','n','no'):
Expand Down
2 changes: 1 addition & 1 deletion clam/tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if [ $? -ne 0 ]; then
fi

cd /tmp
clamnewproject -f clamnewprojecttest
clamnewproject -f clamnewprojecttest --noninteractive
if [ $? -ne 0 ]; then
echo "ERROR: clamnewproject didn't run well" >&2
GOOD=0
Expand Down

0 comments on commit dbd08e0

Please sign in to comment.