SL-321: add in resource files, more CLI handling fixes
parent
2bb4214866
commit
fc7c0645fa
|
|
@ -0,0 +1,9 @@
|
|||
This directory only exists as a place for the summary.json file to exist when the unit tests are run on a Mac, where the file goes to a sibling directory of the scripts dir. In Linux and Windows, the JSON file goes into the same directory as the script.
|
||||
|
||||
See:
|
||||
|
||||
test_get_summary.py
|
||||
update_manager.get_summary()
|
||||
|
||||
for more details
|
||||
- coyot 201606.02
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"Type":"viewer","Version":"4.0.5.315117","Channel":"Second Life Release"}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
"""\
|
||||
@file InstallerError.py
|
||||
@author coyot
|
||||
@date 2016-05-16
|
||||
@brief custom exception class for VMP
|
||||
|
||||
$LicenseInfo:firstyear=2016&license=viewerlgpl$
|
||||
Second Life Viewer Source Code
|
||||
Copyright (C) 2016, Linden Research, Inc.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation;
|
||||
version 2.1 of the License only.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
$/LicenseInfo$
|
||||
"""
|
||||
|
||||
"""
|
||||
usage:
|
||||
|
||||
>>> import InstallerError
|
||||
>>> import os
|
||||
>>> try:
|
||||
... os.mkdir('/tmp')
|
||||
... except OSError, oe:
|
||||
... ie = InstallerError.InstallerError(oe, "foo")
|
||||
... raise ie
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<stdin>", line 5, in <module>
|
||||
InstallerError.InstallerError: [Errno [Errno 17] File exists: '/tmp'] foo
|
||||
"""
|
||||
|
||||
class InstallerError(OSError):
|
||||
def __init___(self, message):
|
||||
Exception.__init__(self, message)
|
||||
|
|
@ -106,11 +106,12 @@ def capture_vmp_args(arg_list = None, cmd_line = None):
|
|||
no_dashes = vmp_params[param]
|
||||
count = cmd_line[no_dashes]['count']
|
||||
param_args = []
|
||||
if count:
|
||||
for argh in range(1,count):
|
||||
if count > 0:
|
||||
for argh in range(0,count):
|
||||
param_args.append(vmp_queue.popleft())
|
||||
#the parameter name is the key, the (possibly empty) list of args is the value
|
||||
cli_overrides[vmp_params[param]] = param_args
|
||||
print "cli override param %s vmp_param %s args %s count %s" % (param, vmp_params[param], param_args, count)
|
||||
|
||||
#to prevent KeyErrors on missing keys, set the remainder to None
|
||||
for key in vmp_params:
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 960 B |
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
|
|
@ -252,8 +252,15 @@ def query_vvm(log_file_handle = None, platform_key = None, settings = None, summ
|
|||
#normal case, no testing key
|
||||
test_ok = 'testok'
|
||||
UUID = make_VVM_UUID_hash(platform_key)
|
||||
print repr(channelname)
|
||||
print repr(version)
|
||||
print repr(platform_key)
|
||||
print repr(platform_version)
|
||||
print repr(test_ok)
|
||||
print repr(UUID)
|
||||
#because urljoin can't be arsed to take multiple elements
|
||||
query_string = '/v1.0/' + channelname + '/' + version + '/' + platform_key + '/' + platform_version + '/' + test_ok + '/' + UUID
|
||||
#channelname is a list because although it can only be one word, it is a kind of argument and viewer args can take multiple keywords.
|
||||
query_string = '/v1.0/' + channelname[0] + '/' + version + '/' + platform_key + '/' + platform_version + '/' + test_ok + '/' + UUID
|
||||
VVMService = llrest.SimpleRESTService(name='VVM', baseurl=base_URI)
|
||||
try:
|
||||
result_data = VVMService.get(query_string)
|
||||
|
|
@ -351,7 +358,7 @@ def update_manager(cli_overrides = None):
|
|||
parent_dir = get_parent_path(platform_key)
|
||||
log_file_handle = get_log_file_handle(parent_dir)
|
||||
settings = None
|
||||
print "parent dir: " + str(parent_dir)
|
||||
print "cli_overrides: " + str(cli_overrides)
|
||||
|
||||
#check to see if user has install rights
|
||||
#get the owner of the install and the current user
|
||||
|
|
|
|||
Loading…
Reference in New Issue