William:
Since you are changing usr/src/cmd/ai-webserver/common_profile.py
,can you take care of the following easy pep8 errors:
indiana-build{ding}696: newpep8 *py
common_profile.py:34:80: E501 line too long (80 characters)
INTERNAL_PROFILE_DIRECTORY = '/var/ai/profile' # profiles stored here
internally
^
common_profile.py:35:80: E501 line too long (80 characters)
AI_MANIFEST_ATTACHMENT_NAME = 'manifest.xml' # MIME attachment name for
manifest
^
common_profile.py:51:1: E302 expected 2 blank lines, found 1
class AICriteriaTemplate(Template):
^
common_profile.py:80:80: E501 line too long (80 characters)
absolutely needed; e.g., install time, installadm for
static profile
^
common_profile.py:246:1: W191 indentation contains tabs
image_dir - path of service image, used to locate service_bundle
^
common_profile.py:246:1: E101 indentation contains mixed spaces and tabs
image_dir - path of service image, used to locate service_bundle
^
common_profile.py:279:1: W191 indentation contains tabs
not os.path.exists(dtd_file):
^
common_profile.py:279:1: E101 indentation contains mixed spaces and tabs
not os.path.exists(dtd_file):
^
common_profile.py:290:5: W191 indentation contains tabs
return etree.tostring(root)
^
common_profile.py:290:5: E101 indentation contains mixed spaces and tabs
return etree.tostring(root)
^
10
indiana-build{ding}697:
The instructions on how to run pep8 is in the usr/src/README for
slim_source. Thanks !!!
On 04/28/11 08:33 AM, William Schumann wrote:
Drew, Dave, implemented your recommendations, thanks.
webrev differences: http://cr.opensolaris.org/~wmsch/bug-7037229-diff/
William
On 04/28/11 04:03 PM, Drew Fisher wrote:
William,
common_profile.py
----------------
370: move import line to top of file
374-379: don't use try/except as a control structure. Be explicit
with os.geteuid()
if os.geteuid() == 0:
<use /system/volatile>
else:
<use /tmp>
Can you switch from using subprocess to solaris_install.Popen instead?
385-387 change to look something like this:
p = Popen.check_call(pargs, stdout=Popen.STORE, stderr=Popen.STORE)
os.unlink(profname)
return p.stderr
and the import line is:
from solaris_install import Popen
Otherwise, this looks ok to me.
-Drew
On 4/28/11 3:54 AM, William Schumann wrote:
Modified code to use 'svccfg apply -n' to validate, since it
tolerates missing 'type' attributes. Tested code and sample profile
changes.
Please review changes.
http://cr.opensolaris.org/~wmsch/bug-7037229/
William
On 04/22/11 11:05 AM, William Schumann wrote:
On 04/21/11 08:10 PM, Dave Miner wrote:
William, your change is OK, though I'd note a general point in
this whole example file that the type attribute for propvals is
not required in a profile (and really shouldn't be used so that
there isn't the possibility of disagreement with the service
manifest that defines them and any resulting weird behavior), so I
would like to see them removed in order to provide a more concise
and correct example.
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss