Juan Hernandez has posted comments on this change.
Change subject: packaging: Clean pgpass file on engine-cleanup
......................................................................
Patch Set 10: (1 inline comment)
....................................................
File packaging/fedora/setup/engine-cleanup.py
Line 179: if not os.path.exists(basedefs.DB_PASS_FILE):
Line 180: logging.debug("The %s file doesn't exist." %
basedefs.DB_PASS_FILE)
Line 181: return
Line 182:
Line 183: # Cleaning .pgpass
You may want to "declare" the backupFile variable here, before the "try":
backupFile = None
(I quote "declare" because there is no such "declaration" of variables in
python)
If you don't do this then you may have "NameError: name 'backupFile' is not
defined" if something fails before assigning a value to that variable in the
"try" block. In this particular case this is extremely unlikely, as assigning
the value is the first thing you do, but it is still possible.
Line 184: try:
Line 185: backupFile = "%s.%s" % (basedefs.DB_PASS_FILE,
utils.getCurrentDateTime())
Line 186: logging.debug("Found %s file, backing current to %s" %
(basedefs.DB_PASS_FILE, backupFile))
Line 187: shutil.copyfile(basedefs.DB_PASS_FILE, backupFile)
--
To view, visit http://gerrit.ovirt.org/7320
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I21cbde71bf0a2181f8e0b8ed31205c26d16d2134
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kiril Nesenko <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Kiril Nesenko <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches