support for Python3
This commit is contained in:
parent
0d1bc5af0d
commit
26212df0f7
4 changed files with 29 additions and 8 deletions
|
@ -14,7 +14,10 @@ import os
|
|||
from subprocess import Popen, PIPE
|
||||
|
||||
from .base import BaseProject
|
||||
from ..packages.ordereddict import OrderedDict
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
except ImportError:
|
||||
from ..packages.ordereddict import OrderedDict
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -67,6 +70,8 @@ class Git(BaseProject):
|
|||
pass
|
||||
if stdout:
|
||||
for line in stdout.splitlines():
|
||||
if isinstance(line, bytes):
|
||||
line = bytes.decode(line)
|
||||
line = line.split(' ', 1)
|
||||
if line[0] == '*':
|
||||
return line[1]
|
||||
|
|
|
@ -14,7 +14,10 @@ import os
|
|||
from subprocess import Popen, PIPE
|
||||
|
||||
from .base import BaseProject
|
||||
from ..packages.ordereddict import OrderedDict
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
except ImportError:
|
||||
from ..packages.ordereddict import OrderedDict
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -51,6 +54,8 @@ class Subversion(BaseProject):
|
|||
'URL',
|
||||
]
|
||||
for line in stdout.splitlines():
|
||||
if isinstance(line, bytes):
|
||||
line = bytes.decode(line)
|
||||
line = line.split(': ', 1)
|
||||
if line[0] in interesting:
|
||||
info[line[0]] = line[1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue