From Yaniv Bronhaim <ybron...@redhat.com>:

Yaniv Bronhaim has uploaded a new change for review.

Change subject: using io.open in passwd.py
......................................................................

using io.open in passwd.py

Change-Id: I85696c7d0b2adf25b9bdb00f77fefdebeb773be9
Signed-off-by: Yaniv Bronhaim <ybron...@redhat.com>
---
M lib/vdsm/tool/configurators/passwd.py
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/77433/1

diff --git a/lib/vdsm/tool/configurators/passwd.py 
b/lib/vdsm/tool/configurators/passwd.py
index 0969b4e..c36fbf8 100644
--- a/lib/vdsm/tool/configurators/passwd.py
+++ b/lib/vdsm/tool/configurators/passwd.py
@@ -18,11 +18,13 @@
 #
 
 from __future__ import absolute_import
+
+import io
+
 from vdsm import constants
 from vdsm import commands
 from vdsm.common import cache
 from vdsm.common import cmdutils
-
 
 from . import YES, NO, MAYBE
 
@@ -47,7 +49,7 @@
 
 
 def libvirt_sasl_isconfigured():
-    with open(_SASL2_CONF, 'r') as f:
+    with io.open(_SASL2_CONF, 'r') as f:
         lines = f.readlines()
         # check for new default configuration - since libvirt 3.2
         if 'mech_list: gssapi\n' in lines:
@@ -84,7 +86,7 @@
 
 
 def configure_libvirt_sasl():
-    with open(_SASL2_CONF, 'w') as f:
+    with io.open(_SASL2_CONF, 'w') as f:
         f.writelines(['## start vdsm-4.20.0 configuration\n',
                       'mech_list: scram-sha-1\n',
                       'sasldb_path: %s\n' % (_LIBVIRT_SASLDB),
@@ -101,5 +103,5 @@
 
 @cache.memoized
 def libvirt_password():
-    with open(LIBVIRT_PASSWORD_PATH) as passwd_file:
+    with io.open(LIBVIRT_PASSWORD_PATH) as passwd_file:
         return passwd_file.readline().rstrip("\n")


-- 
To view, visit https://gerrit.ovirt.org/77433
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85696c7d0b2adf25b9bdb00f77fefdebeb773be9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to