From 358c02b0f6c97c9815325e9073a5c7d5c055bd9d Mon Sep 17 00:00:00 2001 From: Samuel Keeley Date: Wed, 23 Oct 2024 09:15:25 -0500 Subject: [PATCH 1/3] update for python 3.11+ --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7797ce1..eaca26f 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ try: from ConfigParser import SafeConfigParser except ImportError: - from configparser import SafeConfigParser + from configparser import ConfigParser settings = SafeConfigParser() settings.read(os.path.realpath('aws_ec2_assign_elastic_ip/settings.conf')) From 5190b62da29d4c605adc686d573d5097e1655f7e Mon Sep 17 00:00:00 2001 From: Samuel Keeley Date: Wed, 23 Oct 2024 09:16:17 -0500 Subject: [PATCH 2/3] more update --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index eaca26f..5811b46 100644 --- a/setup.py +++ b/setup.py @@ -2,11 +2,11 @@ import os from setuptools import setup try: - from ConfigParser import SafeConfigParser + from ConfigParser import SafeConfigParser as ConfigParser except ImportError: from configparser import ConfigParser -settings = SafeConfigParser() +settings = ConfigParser() settings.read(os.path.realpath('aws_ec2_assign_elastic_ip/settings.conf')) setup( From 10271b062a458f5781364df2dbfc4bb518eb51bd Mon Sep 17 00:00:00 2001 From: Samuel Keeley Date: Wed, 23 Oct 2024 09:17:45 -0500 Subject: [PATCH 3/3] more update --- aws_ec2_assign_elastic_ip/command_line_options.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws_ec2_assign_elastic_ip/command_line_options.py b/aws_ec2_assign_elastic_ip/command_line_options.py index a5a16d5..be01d28 100644 --- a/aws_ec2_assign_elastic_ip/command_line_options.py +++ b/aws_ec2_assign_elastic_ip/command_line_options.py @@ -2,9 +2,9 @@ import argparse import sys try: - from ConfigParser import SafeConfigParser + from ConfigParser import SafeConfigParser as ConfigParser except ImportError: - from configparser import SafeConfigParser + from configparser import ConfigParser from argparse import RawTextHelpFormatter if sys.platform in ['win32', 'cygwin']: @@ -12,7 +12,7 @@ else: import os.path as ospath -SETTINGS = SafeConfigParser() +SETTINGS = ConfigParser() SETTINGS.read('{0}/settings.conf'.format( ospath.dirname(ospath.realpath(__file__))))