I only looked at the ICTs. I trust you on the unittests. :)
------------------
apply_sysconfig.py
------------------
28: move under line 31 to keep consistent with imports
make sure you unset ICT.SVCCFG_DTD and ICT.SVCCFG_REPOSITORY at the
end of the file.
del os.environ[ICT.SVCCFG_DTD]
112-118: question for you. does the file at os.path.join(root, name)
already have valid permissions? i.e. read-only by root and chown
root:sys? If so, you can skip all the manual setting of that by using
shutil.copy2() instead of shutil.copy()
-----------------
transfer_files.py
-----------------
let's stream line this entire thing. I'm really not a big fan of 4
line functions/methods as there's quite a bit of overhead for python
to go look that method up.
What about changing 111-123 to something like this (and dropping the
copy_file method entirely)
if os.path.isdir(source):
if not os.path.exists(dest):
shutil.copytree(source, dest) # dest must *not* exist
else:
for listfile in os.listdir(source):
shutil.copy2(os.path.join(source, listfile), dest) #
NOTE: assumes no sub directories
else:
if not os.path.exists(dest):
os.makedirs(dest)
shutil.copy2(source, dest)
-Drew
On 3/28/11 4:04 PM, Virginia Wray wrote:
Hi --
A couple of loose ends to tie up on the ICT conversion, which is part
of the following
bug fix:
https://defect.opensolaris.org/bz/show_bug.cgi?id=6255
The webrev is located at:
http://cr.opensolaris.org/~ginnie/ICTs/
Please get feedback to me by cob on 4/4.
Thanks,
ginnie
_______________________________________________
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