Keith Robertson has posted comments on this change.
Change subject: tools: Better API error handling
......................................................................
Patch Set 2: (2 inline comments)
....................................................
File src/engine-iso-uploader.py
Line 539: if returncode == 0 and dir_size is not None:
Line 540: # This simply means that the SSH command was successful.
Line 541: dir_size = dir_size.strip()
Line 542: file_size = os.path.getsize(file)
Line 543: logging.debug("Size of %s:\t%s bytes\t%.1f
1K-blocks\t%.1f MB" %
Have no plans to change this in this patch. Old code that was reformatted
because I had some Python Pep8 settings inadvertently enabled when I edited
this project. Will send another patch that undoes all of this re-formatting.
Line 544: (file, file_size, file_size / 1024,
(file_size / 1024) / 1024))
Line 545: logging.debug("Available space in %s:\t%s bytes\t%.1f
1K-blocks\t%.1f MB" %
Line 546: (dir, dir_size, float(dir_size) / 1024,
(float(dir_size) / 1024) / 1024))
Line 547: return (dir_size, file_size)
Line 581: Returns: True if successful and false otherwise.
Line 582: """
Line 583: retVal = True
Line 584: logging.debug("euid(%s) egid(%s)" % (os.geteuid(),
os.getegid()))
Line 585: umask_save = os.umask(0137) # Set to 660
Always beware of comments ;) but yeah umask is correct and the resulting 640
perms are also correct.
Line 586: try:
Line 587: src = open(src_file_name, 'r')
Line 588: os.setegid(gid)
Line 589: os.seteuid(uid)
--
To view, visit http://gerrit.ovirt.org/8954
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib51002532b726cb7becdd4e4289d385119fa1ea3
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-iso-uploader
Gerrit-Branch: master
Gerrit-Owner: Keith Robertson <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Keith Robertson <[email protected]>
Gerrit-Reviewer: Kiril Nesenko <[email protected]>
Gerrit-Reviewer: Moran Goldboim <[email protected]>
Gerrit-Reviewer: ShaoHe Feng <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches