Commit 393cf091 authored by Boxiang Sun's avatar Boxiang Sun

software/turnserver: move to python3

parent 4371e39c
......@@ -25,7 +25,10 @@
#
##############################################################################
import ConfigParser
try:
from ConfigParser import ConfigParser, NoSectionError
except ImportError:
from configparser import ConfigParser, NoSectionError
import os
import zc.buildout
......@@ -53,7 +56,7 @@ class WriteRecipe(GenericBaseRecipe):
def install(self):
# Set up the parser, and write config file if needed
self.parser = ConfigParser.ConfigParser()
self.parser = ConfigParser()
try:
self.parser.read(self.path)
#clean_options(options)
......@@ -63,7 +66,7 @@ class WriteRecipe(GenericBaseRecipe):
with open(self.path, 'w') as file:
self.parser.write(file)
# If the file or section do not exist
except (ConfigParser.NoSectionError, IOError) as e:
except (NoSectionError, IOError) as e:
self.full_install()
def full_install(self):
......@@ -94,7 +97,7 @@ class ReadRecipe(GenericBaseRecipe):
self.path = options['file-path'].strip()
# Set up the parser, and write config file if needed
self.parser = ConfigParser.ConfigParser()
self.parser = ConfigParser()
if os.path.exists(self.path):
self.parser.read(self.path)
for section in self.parser.sections():
......
......@@ -18,3 +18,4 @@ extra =
powerdns ${slapos.test.powerdns-setup:setup}
proftpd ${slapos.test.proftpd-setup:setup}
repman ${slapos.test.repman-setup:setup}
turnserver ${slapos.test.turnserver-setup:setup}
......@@ -197,7 +197,6 @@ eggs +=
${slapos.test.slaprunner-setup:egg}
${slapos.test.jupyter-setup:egg}
${slapos.test.nextcloud-setup:egg}
${slapos.test.turnserver-setup:egg}
${slapos.test.theia-setup:egg}
${slapos.test.cloudooo-setup:egg}
${slapos.test.dream-setup:egg}
......
......@@ -14,6 +14,8 @@ parts =
coturn
instance-cfg
[python]
part = python3
[download-base]
recipe = slapos.recipe.build:download
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment