Robert Schweikert
dbf3b00dd8
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/aws-efs-utils?expand=0&rev=1
99 lines
2.6 KiB
Diff
99 lines
2.6 KiB
Diff
--- src/mount_efs/__init__.py.orig
|
|
+++ src/mount_efs/__init__.py
|
|
@@ -44,9 +44,9 @@ from contextlib import contextmanager
|
|
from logging.handlers import RotatingFileHandler
|
|
|
|
try:
|
|
- import ConfigParser
|
|
+ import ConfigParser as cp
|
|
except ImportError:
|
|
- from configparser import ConfigParser
|
|
+ import configparser as cp
|
|
|
|
try:
|
|
from urllib2 import urlopen, URLError
|
|
@@ -517,7 +517,7 @@ def assert_root():
|
|
|
|
|
|
def read_config(config_file=CONFIG_FILE):
|
|
- p = ConfigParser.SafeConfigParser()
|
|
+ p = cp.ConfigParser()
|
|
p.read(config_file)
|
|
return p
|
|
|
|
--- src/watchdog/__init__.py.orig
|
|
+++ src/watchdog/__init__.py
|
|
@@ -21,9 +21,9 @@ from logging.handlers import RotatingFil
|
|
from signal import SIGTERM
|
|
|
|
try:
|
|
- import ConfigParser
|
|
+ import ConfigParser as cp
|
|
except ImportError:
|
|
- from configparser import ConfigParser
|
|
+ import configparser as cp
|
|
|
|
VERSION = '1.5'
|
|
|
|
@@ -275,7 +275,7 @@ def assert_root():
|
|
|
|
|
|
def read_config(config_file=CONFIG_FILE):
|
|
- p = ConfigParser.SafeConfigParser()
|
|
+ p = cp.ConfigParser()
|
|
p.read(config_file)
|
|
return p
|
|
|
|
--- test/mount_efs_test/test_choose_tls_port.py.orig
|
|
+++ test/mount_efs_test/test_choose_tls_port.py
|
|
@@ -7,9 +7,13 @@
|
|
#
|
|
|
|
import mount_efs
|
|
-import ConfigParser
|
|
import socket
|
|
|
|
+try:
|
|
+ import ConfigParser as cp
|
|
+except ImportError:
|
|
+ import configparser as cp
|
|
+
|
|
import pytest
|
|
|
|
from mock import MagicMock
|
|
@@ -19,7 +23,7 @@ DEFAULT_TLS_PORT_RANGE_HIGH = 20449
|
|
|
|
|
|
def _get_config():
|
|
- config = ConfigParser.SafeConfigParser()
|
|
+ config = cp.ConfigParser()
|
|
config.add_section(mount_efs.CONFIG_SECTION)
|
|
config.set(mount_efs.CONFIG_SECTION, 'port_range_lower_bound', str(DEFAULT_TLS_PORT_RANGE_LOW))
|
|
config.set(mount_efs.CONFIG_SECTION, 'port_range_upper_bound', str(DEFAULT_TLS_PORT_RANGE_HIGH))
|
|
--- test/mount_efs_test/test_write_stunnel_config_file.py.orig
|
|
+++ test/mount_efs_test/test_write_stunnel_config_file.py
|
|
@@ -7,9 +7,13 @@
|
|
#
|
|
|
|
import mount_efs
|
|
-import ConfigParser
|
|
import os
|
|
|
|
+try:
|
|
+ import ConfigParser as cp
|
|
+except ImportError:
|
|
+ import configparser as cp
|
|
+
|
|
import pytest
|
|
|
|
FS_ID = 'fs-deadbeef'
|
|
@@ -32,7 +36,7 @@ def _get_config(mocker, stunnel_debug_en
|
|
if stunnel_check_cert_validity is None:
|
|
stunnel_check_cert_validity = stunnel_check_cert_validity_supported
|
|
|
|
- config = ConfigParser.SafeConfigParser()
|
|
+ config = cp.ConfigParser()
|
|
config.add_section(mount_efs.CONFIG_SECTION)
|
|
config.set(mount_efs.CONFIG_SECTION, 'stunnel_debug_enabled', str(stunnel_debug_enabled))
|
|
config.set(mount_efs.CONFIG_SECTION, 'stunnel_check_cert_hostname', str(stunnel_check_cert_hostname))
|