Change in vdsm[master]: mount: fix _loopFsSpecsTimestamp global definition

Federico Simoncelli fsimonce at redhat.com
Thu Sep 4 12:47:26 UTC 2014


Federico Simoncelli has uploaded a new change for review.

Change subject: mount: fix _loopFsSpecsTimestamp global definition
......................................................................

mount: fix _loopFsSpecsTimestamp global definition

The variable _loopFsSpecsTimestamp should be defined as global before
its first use within a function.

Change-Id: Id844fd830a7ed52196d3dda91664a370ea99938b
Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
---
M vdsm/storage/mount.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/32472/1

diff --git a/vdsm/storage/mount.py b/vdsm/storage/mount.py
index 44c3134..fefa5df 100644
--- a/vdsm/storage/mount.py
+++ b/vdsm/storage/mount.py
@@ -86,6 +86,7 @@
 
 
 def _getLoopFsSpecs():
+    global _loopFsSpecsTimestamp
     with _loopFsSpecsLock:
         mtabTimestamp = os.stat(_ETC_MTAB_PATH).st_mtime
         if _loopFsSpecsTimestamp != mtabTimestamp:
@@ -95,7 +96,6 @@
                 for opt in entry.fs_mntops:
                     if opt.startswith('loop='):
                         _loopFsSpecs[opt[len('loop='):]] = entry.fs_spec
-            global _loopFsSpecsTimestamp
             _loopFsSpecsTimestamp = mtabTimestamp
     return _loopFsSpecs
 


-- 
To view, visit http://gerrit.ovirt.org/32472
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id844fd830a7ed52196d3dda91664a370ea99938b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>


More information about the vdsm-patches mailing list