ports/databases/mongodb/36/patches/python3-buildscripts_utils_py

31 lines
898 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Index: buildscripts/utils.py
--- buildscripts/utils.py.orig
+++ buildscripts/utils.py
@@ -107,7 +107,7 @@ def getGitDescribe():
stderr=devnull,
stdin=devnull,
shell=True)
- return proc.communicate()[0].strip()
+ return proc.communicate()[0].strip().decode('utf-8')
def execsys( args ):
import subprocess
@@ -122,7 +122,7 @@ def getprocesslist():
raw = ""
try:
raw = execsys( "/bin/ps axww" )[0]
- except Exception,e:
+ except Exception as e:
print( "can't get processlist: " + str( e ) )
r = re.compile( "[\r\n]+" )
@@ -176,7 +176,7 @@ def didMongodStart( port=27017 , timeout=20 ):
try:
checkMongoPort( port )
return True
- except Exception,e:
+ except Exception as e:
print( e )
timeout = timeout - 1
return False