Compare commits
7 Commits
v0.6
...
iljah/py3-
Author | SHA1 | Date | |
---|---|---|---|
|
dcbc9ab0ef | ||
|
c54865eef4 | ||
|
d5d3f7423f | ||
|
a692c19faa | ||
|
39b952af53 | ||
|
557c16a6b9 | ||
|
7c66577671 |
|
@ -58,7 +58,11 @@ For further examples please reference `.tests.test_api`.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
|
try:
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
import configparser as ConfigParser
|
||||||
|
ConfigParser.SafeConfigParser = ConfigParser.ConfigParser
|
||||||
import errno
|
import errno
|
||||||
import hashlib
|
import hashlib
|
||||||
import httplib
|
import httplib
|
||||||
|
|
|
@ -10,7 +10,11 @@ Bitmessage commandline interface
|
||||||
# * python2-pythondialog
|
# * python2-pythondialog
|
||||||
# * dialog
|
# * dialog
|
||||||
|
|
||||||
|
try:
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
import configparser as ConfigParser
|
||||||
|
ConfigParser.SafeConfigParser = ConfigParser.ConfigParser
|
||||||
import curses
|
import curses
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
|
@ -2,7 +2,11 @@
|
||||||
BMConfigParser class definition and default configuration settings
|
BMConfigParser class definition and default configuration settings
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
try:
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
import configparser as ConfigParser
|
||||||
|
ConfigParser.SafeConfigParser = ConfigParser.ConfigParser
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
@ -60,21 +64,33 @@ class BMConfigParser(ConfigParser.SafeConfigParser):
|
||||||
raise ValueError("Invalid value %s" % value)
|
raise ValueError("Invalid value %s" % value)
|
||||||
return ConfigParser.ConfigParser.set(self, section, option, value)
|
return ConfigParser.ConfigParser.set(self, section, option, value)
|
||||||
|
|
||||||
def get(self, section, option, raw=False, variables=None):
|
def get(self, section, option, raw=False, vars=None, fallback=None):
|
||||||
# pylint: disable=arguments-differ
|
# pylint: disable=arguments-differ
|
||||||
try:
|
try:
|
||||||
if section == "bitmessagesettings" and option == "timeformat":
|
if section == "bitmessagesettings" and option == "timeformat":
|
||||||
|
try:
|
||||||
return ConfigParser.ConfigParser.get(
|
return ConfigParser.ConfigParser.get(
|
||||||
self, section, option, raw, variables)
|
self, section, option, raw=raw, vars=vars, fallback=fallback)
|
||||||
|
except TypeError:
|
||||||
|
return ConfigParser.ConfigParser.get(
|
||||||
|
self, section, option, raw=raw, vars=vars)
|
||||||
try:
|
try:
|
||||||
return self._temp[section][option]
|
return self._temp[section][option]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
try:
|
||||||
return ConfigParser.ConfigParser.get(
|
return ConfigParser.ConfigParser.get(
|
||||||
self, section, option, True, variables)
|
self, section, option, raw=True, vars=vars, fallback=fallback)
|
||||||
|
except TypeError:
|
||||||
|
return ConfigParser.ConfigParser.get(
|
||||||
|
self, section, option, raw=True, vars=vars)
|
||||||
except ConfigParser.InterpolationError:
|
except ConfigParser.InterpolationError:
|
||||||
|
try:
|
||||||
return ConfigParser.ConfigParser.get(
|
return ConfigParser.ConfigParser.get(
|
||||||
self, section, option, True, variables)
|
self, section, option, raw=True, vars=vars, fallback=fallback)
|
||||||
|
except TypeError:
|
||||||
|
return ConfigParser.ConfigParser.get(
|
||||||
|
self, section, option, raw=True, vars=vars)
|
||||||
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError) as e:
|
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError) as e:
|
||||||
try:
|
try:
|
||||||
return BMConfigDefaults[section][option]
|
return BMConfigDefaults[section][option]
|
||||||
|
|
|
@ -35,7 +35,11 @@ Logging is thread-safe so you don't have to worry about locks,
|
||||||
just import and log.
|
just import and log.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
try:
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
import configparser as ConfigParser
|
||||||
|
ConfigParser.SafeConfigParser = ConfigParser.ConfigParser
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -301,7 +301,7 @@ def check_openssl():
|
||||||
' OpenSSL 0.9.8b or later with AES, Elliptic Curves (EC),'
|
' OpenSSL 0.9.8b or later with AES, Elliptic Curves (EC),'
|
||||||
' ECDH, and ECDSA enabled.')
|
' ECDH, and ECDSA enabled.')
|
||||||
return False
|
return False
|
||||||
matches = cflags_regex.findall(openssl_cflags)
|
matches = cflags_regex.findall(openssl_cflags.decode())
|
||||||
if matches:
|
if matches:
|
||||||
logger.error(
|
logger.error(
|
||||||
'This OpenSSL library is missing the following required'
|
'This OpenSSL library is missing the following required'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user