Changeset View
Changeset View
Standalone View
Standalone View
pykolab/setup/setup_php.py
Show All 11 Lines | |||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
# GNU General Public License for more details. | # GNU General Public License for more details. | ||||
# You should have received a copy of the GNU General Public License | # You should have received a copy of the GNU General Public License | ||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
# | # | ||||
from __future__ import print_function | |||||
from augeas import Augeas | from augeas import Augeas | ||||
import os | import os | ||||
import shutil | import shutil | ||||
import subprocess | import subprocess | ||||
import tempfile | import tempfile | ||||
import components | import components | ||||
Show All 33 Lines | |||||
def description(): | def description(): | ||||
return _("Setup PHP.") | return _("Setup PHP.") | ||||
def execute(*args, **kw): | def execute(*args, **kw): | ||||
if conf.timezone is None: | if conf.timezone is None: | ||||
print >> sys.stderr, utils.multiline_message( | print(utils.multiline_message( | ||||
_(""" | _(""" | ||||
Please supply the timezone PHP should be using. | Please supply the timezone PHP should be using. | ||||
You have to use a Continent or Country / City locality name | You have to use a Continent or Country / City locality name | ||||
like 'Europe/Berlin', but not just 'CEST'. | like 'Europe/Berlin', but not just 'CEST'. | ||||
""") | """) | ||||
) | ), file=sys.stderr) | ||||
conf.timezone = utils.ask_question( | conf.timezone = utils.ask_question( | ||||
_("Timezone ID"), | _("Timezone ID"), | ||||
default="UTC" | default="UTC" | ||||
) | ) | ||||
if conf.php_ini_path is not None: | if conf.php_ini_path is not None: | ||||
if not os.path.isfile(conf.php_ini_path): | if not os.path.isfile(conf.php_ini_path): | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |