[node-patches] Change in ovirt-node[master]: fs/__init__.py: check if it's a file before chksum
dougsland at redhat.com
dougsland at redhat.com
Fri Apr 22 15:32:14 UTC 2016
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: fs/__init__.py: check if it's a file before chksum
......................................................................
fs/__init__.py: check if it's a file before chksum
Make sure before doing the cksum validation, it's a file, not a dir.
Change-Id: I8a50dca7521336a9feafbc6c03fa38e1a57a6ba9
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1311370
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
---
M src/ovirt/node/utils/fs/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/08/56508/1
diff --git a/src/ovirt/node/utils/fs/__init__.py b/src/ovirt/node/utils/fs/__init__.py
index c4fb223..c83146c 100644
--- a/src/ovirt/node/utils/fs/__init__.py
+++ b/src/ovirt/node/utils/fs/__init__.py
@@ -687,7 +687,7 @@
exists &= os.path.exists(persisted_path)
exists &= os.path.exists(filename)
- if exists and check_is_in_sync:
+ if exists and check_is_in_sync and os.path.isfile(filename):
# If requested, also check that the contents match
current_checksum = self.checksum(filename)
stored_checksum = self.checksum(persisted_path)
--
To view, visit https://gerrit.ovirt.org/56508
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a50dca7521336a9feafbc6c03fa38e1a57a6ba9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
More information about the node-patches
mailing list