| |
@@ -25,8 +25,6 @@
|
| |
import sys
|
| |
import tempfile
|
| |
|
| |
- from ConfigParser import ConfigParser
|
| |
-
|
| |
import gssapi
|
| |
|
| |
from osbs.api import OSBS
|
| |
@@ -409,9 +407,9 @@
|
| |
raise rpkgError('Unable to find remote push url: %s' % e)
|
| |
if isinstance(url, six.text_type):
|
| |
# GitPython >= 1.0 return unicode. It must be encoded to string.
|
| |
- self._push_url = url.encode('utf-8')
|
| |
- else:
|
| |
self._push_url = url
|
| |
+ else:
|
| |
+ self._push_url = url.decode('utf-8')
|
| |
|
| |
@property
|
| |
def commithash(self):
|
| |
@@ -492,7 +490,8 @@
|
| |
"""Get the local arch as defined by rpm"""
|
| |
|
| |
proc = subprocess.Popen(['rpm --eval %{_arch}'], shell=True,
|
| |
- stdout=subprocess.PIPE)
|
| |
+ stdout=subprocess.PIPE,
|
| |
+ universal_newlines=True)
|
| |
self._localarch = proc.communicate()[0].strip('\n')
|
| |
|
| |
@property
|
| |
@@ -536,8 +535,8 @@
|
| |
# self._module_name = "/".join(parts.path.split("/")[-2:])
|
| |
module_name = posixpath.basename(parts.path)
|
| |
|
| |
- if module_name.endswith(b'.git'):
|
| |
- module_name = module_name[:-len(b'.git')]
|
| |
+ if module_name.endswith('.git'):
|
| |
+ module_name = module_name[:-len('.git')]
|
| |
self._module_name = module_name
|
| |
return
|
| |
except rpkgError:
|
| |
@@ -2548,7 +2547,7 @@
|
| |
|
| |
def container_build_setup(self, get_autorebuild=None,
|
| |
set_autorebuild=None):
|
| |
- cfp = ConfigParser.SafeConfigParser()
|
| |
+ cfp = configparser.SafeConfigParser()
|
| |
if os.path.exists(self.osbs_config_filename):
|
| |
cfp.read(self.osbs_config_filename)
|
| |
|
| |
Fix a few issues with Python 3.x compatibility. With this patch
and the respective patches in other packages I can successfully
run at least some 'fedpkg' commands.
See also:
https://pagure.io/fedpkg/pull-request/43