Skip to content

Commit

Permalink
Modifications for py3.12 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
aanil committed Jul 15, 2024
1 parent 53a991a commit 2c39e65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
14 changes: 4 additions & 10 deletions genologics/config.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import os
import sys
import warnings

try:
from ConfigParser import SafeConfigParser
except ImportError:
from configparser import SafeConfigParser
from configparser import ConfigParser



Expand All @@ -21,8 +15,8 @@
spec_config = None

def get_config_info(config_file):
config = SafeConfigParser()
config.readfp(open(config_file))
config = ConfigParser()
config.config.read_file(open(config_file))


BASEURI = config.get('genologics', 'BASEURI').rstrip()
Expand All @@ -45,7 +39,7 @@ def load_config(specified_config = None):
if specified_config != None:
config_file = specified_config
else:
config = SafeConfigParser()
config = ConfigParser()
try:
conf_file = config.read([os.path.expanduser('~/.genologicsrc'), '.genologicsrc',
'genologics.conf', 'genologics.cfg', '/etc/genologics.conf'])
Expand Down
2 changes: 1 addition & 1 deletion genologics/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__="1.0.0"
__version__="2.0.0"

0 comments on commit 2c39e65

Please sign in to comment.