Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Steven Gueguen
slapos
Commits
cb528baf
Commit
cb528baf
authored
Jul 25, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove trailing whitespaces on all slapos.git except ERP5 related.
parent
bdbf8dcf
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
63 additions
and
63 deletions
+63
-63
slapos/recipe/fontconfig/__init__.py
slapos/recipe/fontconfig/__init__.py
+1
-1
slapos/recipe/haproxy/__init__.py
slapos/recipe/haproxy/__init__.py
+3
-3
slapos/recipe/kumofs/__init__.py
slapos/recipe/kumofs/__init__.py
+5
-5
slapos/recipe/lamp/__init__.py
slapos/recipe/lamp/__init__.py
+3
-3
slapos/recipe/lamp/runner.py
slapos/recipe/lamp/runner.py
+2
-2
slapos/recipe/logrotate.py
slapos/recipe/logrotate.py
+1
-1
slapos/recipe/memcached/__init__.py
slapos/recipe/memcached/__init__.py
+4
-4
slapos/recipe/nosqltestbed/kumo/__init__.py
slapos/recipe/nosqltestbed/kumo/__init__.py
+4
-4
slapos/recipe/proactive/__init__.py
slapos/recipe/proactive/__init__.py
+3
-3
slapos/recipe/pulse2/__init__.py
slapos/recipe/pulse2/__init__.py
+13
-13
slapos/recipe/seleniumrunner/ERP5TypeFunctionalTestCase.py
slapos/recipe/seleniumrunner/ERP5TypeFunctionalTestCase.py
+1
-1
slapos/recipe/seleniumrunner/__init__.py
slapos/recipe/seleniumrunner/__init__.py
+1
-1
slapos/recipe/seleniumrunner/testrunner.py
slapos/recipe/seleniumrunner/testrunner.py
+4
-4
slapos/recipe/sheepdogtestbed/__init__.py
slapos/recipe/sheepdogtestbed/__init__.py
+6
-6
slapos/recipe/siptester/__init__.py
slapos/recipe/siptester/__init__.py
+2
-2
slapos/recipe/slaprunner/__init__.py
slapos/recipe/slaprunner/__init__.py
+1
-1
slapos/recipe/softwaretype.py
slapos/recipe/softwaretype.py
+1
-1
slapos/recipe/sphinx/__init__.py
slapos/recipe/sphinx/__init__.py
+3
-3
software/net2ftp/configure.py
software/net2ftp/configure.py
+3
-3
software/zencart/configure.py
software/zencart/configure.py
+2
-2
No files found.
slapos/recipe/fontconfig/__init__.py
View file @
cb528baf
...
...
@@ -77,7 +77,7 @@ class Recipe(GenericBaseRecipe):
onetimedownload_config
[
'url'
]
=
url
onetimedownload_config
[
'file_path'
]
=
file_path
onetimedownload_runner_path
=
self
.
createExecutable
(
bin_path
,
self
.
substituteTemplate
(
wrapper_template_location
,
self
.
substituteTemplate
(
wrapper_template_location
,
onetimedownload_config
))
created_file_list
.
append
(
onetimedownload_runner_path
)
...
...
slapos/recipe/haproxy/__init__.py
View file @
cb528baf
...
...
@@ -77,13 +77,13 @@ class Recipe(GenericBaseRecipe):
i
+=
1
server_snippet
+=
self
.
substituteTemplate
(
snippet_filename
,
dict
(
name
=
'%s_%s'
%
(
name
,
i
),
name
=
'%s_%s'
%
(
name
,
i
),
address
=
address
,
cluster_zope_thread_amount
=
self
.
options
[
'maxconn'
]))
config
=
dict
(
name
=
name
,
ip
=
self
.
options
[
'ip'
],
name
=
name
,
ip
=
self
.
options
[
'ip'
],
port
=
self
.
options
[
'port'
],
server_text
=
server_snippet
,
server_check_path
=
self
.
options
[
'server-check-path'
],)
...
...
slapos/recipe/kumofs/__init__.py
View file @
cb528baf
...
...
@@ -43,15 +43,15 @@ class Recipe(BaseSlapRecipe):
# XXX-Cedric : add logrotate?
self
.
cron_d
=
self
.
installCrond
()
kumo_conf
=
self
.
installKumo
(
self
.
getLocalIPv4Address
())
ca_conf
=
self
.
installCertificateAuthority
()
key
,
certificate
=
self
.
requestCertificate
(
'Login Based Access'
)
stunnel_conf
=
self
.
installStunnel
(
self
.
getGlobalIPv6Address
(),
self
.
getLocalIPv4Address
(),
12345
,
kumo_conf
[
'kumo_gateway_port'
],
certificate
,
key
,
ca_conf
[
'ca_crl'
],
ca_conf
[
'certificate_authority_path'
])
self
.
linkBinary
()
self
.
setConnectionDict
(
dict
(
stunnel_ip
=
stunnel_conf
[
'public_ip'
],
...
...
@@ -80,7 +80,7 @@ class Recipe(BaseSlapRecipe):
os
.
symlink
(
target
,
link
)
self
.
logger
.
debug
(
'Created link %r -> %r'
%
(
link
,
target
))
self
.
path_list
.
append
(
link
)
def
installCrond
(
self
):
timestamps
=
self
.
createDataDirectory
(
'cronstamps'
)
...
...
@@ -103,7 +103,7 @@ class Recipe(BaseSlapRecipe):
)[
0
]
self
.
path_list
.
append
(
wrapper
)
return
cron_d
def
installLogrotate
(
self
):
"""Installs logortate main configuration file and registers its to cron"""
logrotate_d
=
os
.
path
.
abspath
(
os
.
path
.
join
(
self
.
etc_directory
,
...
...
slapos/recipe/lamp/__init__.py
View file @
cb528baf
...
...
@@ -158,7 +158,7 @@ class BaseRecipe(BaseSlapRecipe):
open
(
destination
,
'w'
).
write
(
open
(
template
,
'r'
).
read
()
%
d
)
def
configureInstallation
(
self
,
document_root
,
url
,
mysql_conf
):
"""Start process which can launch python scripts, move or remove files or
"""Start process which can launch python scripts, move or remove files or
directories when installing software.
"""
if
not
self
.
options
.
has_key
(
'delete'
)
and
not
self
.
options
.
has_key
(
'rename'
)
and
not
\
...
...
@@ -179,7 +179,7 @@ class BaseRecipe(BaseSlapRecipe):
else
:
argument
=
argument
+
[
"-f"
,
self
.
options
[
'file_token'
].
strip
()]
argument
+=
[
"-t"
,
document_root
]
if
self
.
options
.
has_key
(
'delete'
):
delete
=
[
"delete"
]
for
fname
in
self
.
options
[
'delete'
].
split
(
','
):
...
...
@@ -231,7 +231,7 @@ class Simple(BaseRecipe):
url
=
self
.
installApache
(
document_root
)
renamed
=
self
.
configureInstallation
(
document_root
,
url
,
mysql_conf
)
connectionDict
=
dict
(
url
=
url
,
url
=
url
,
**
mysql_conf
)
if
not
renamed
==
""
:
...
...
slapos/recipe/lamp/runner.py
View file @
cb528baf
import
sys
import
subprocess
def
executeRunner
(
args
):
"""Start the instance configure. this may run a python script, move or/and rename
"""Start the instance configure. this may run a python script, move or/and rename
file or directory when dondition is filled. the condition may be when file exist or when an entry
exist into database.
"""
...
...
slapos/recipe/logrotate.py
View file @
cb528baf
...
...
@@ -41,7 +41,7 @@ class Recipe(GenericBaseRecipe):
'include %s'
%
logrotate_d
,
]
logrotate_conf_file
=
self
.
createFile
(
logrotate_conf_file
,
logrotate_conf_file
=
self
.
createFile
(
logrotate_conf_file
,
'
\
n
'
.
join
(
logrotate_conf
))
state_file
=
self
.
options
[
'state-file'
]
...
...
slapos/recipe/memcached/__init__.py
View file @
cb528baf
...
...
@@ -44,7 +44,7 @@ class Recipe(BaseSlapRecipe):
self
.
cron_d
=
self
.
installCrond
()
memcached_conf
=
self
.
installMemcached
(
ip
=
self
.
getLocalIPv4Address
(),
port
=
11000
)
ca_conf
=
self
.
installCertificateAuthority
()
key
,
certificate
=
self
.
requestCertificate
(
'Memcached'
)
...
...
@@ -52,7 +52,7 @@ class Recipe(BaseSlapRecipe):
self
.
getLocalIPv4Address
(),
12345
,
memcached_conf
[
'memcached_port'
],
certificate
,
key
,
ca_conf
[
'ca_crl'
],
ca_conf
[
'certificate_authority_path'
])
self
.
linkBinary
()
self
.
setConnectionDict
(
dict
(
stunnel_ip
=
stunnel_conf
[
'public_ip'
],
...
...
@@ -81,7 +81,7 @@ class Recipe(BaseSlapRecipe):
os
.
symlink
(
target
,
link
)
self
.
logger
.
debug
(
'Created link %r -> %r'
%
(
link
,
target
))
self
.
path_list
.
append
(
link
)
def
installCrond
(
self
):
timestamps
=
self
.
createDataDirectory
(
'cronstamps'
)
cron_output
=
os
.
path
.
join
(
self
.
log_directory
,
'cron-output'
)
...
...
@@ -103,7 +103,7 @@ class Recipe(BaseSlapRecipe):
)[
0
]
self
.
path_list
.
append
(
wrapper
)
return
cron_d
def
installLogrotate
(
self
):
"""Installs logortate main configuration file and registers its to cron"""
logrotate_d
=
os
.
path
.
abspath
(
os
.
path
.
join
(
self
.
etc_directory
,
...
...
slapos/recipe/nosqltestbed/kumo/__init__.py
View file @
cb528baf
...
...
@@ -43,14 +43,14 @@ class KumoTestBed(object):
kumo_cloud_config
[
'address'
]
=
recipe
.
getGlobalIPv6Address
()
kumo_cloud_config
[
'report_path'
]
=
recipe
.
log_directory
kumo_cloud_config
.
setdefault
(
'max_server'
,
4
)
kumo_cloud_config
.
setdefault
(
'max_tester'
,
5
)
kumo_cloud_config
.
setdefault
(
'nb_thread'
,
32
)
kumo_cloud_config
.
setdefault
(
'nb_request'
,
1024000
)
kumo_cloud_config
.
setdefault
(
'erp5_publish_url'
,
''
)
kumo_cloud_config
.
setdefault
(
'erp5_publish_project'
,
''
)
computer_guid_list
=
[]
computer_guid_list
.
append
(
"COMP-23"
)
# manager
computer_guid_list
.
append
(
"COMP-13"
)
# server 1
...
...
@@ -62,9 +62,9 @@ class KumoTestBed(object):
computer_guid_list
.
append
(
"COMP-14"
)
# tester 3
computer_guid_list
.
append
(
"COMP-20"
)
# tester 4
computer_guid_list
.
append
(
"COMP-19"
)
# tester 5
kumo_cloud_config
.
setdefault
(
'computer_guid_list'
,
":"
.
join
(
computer_guid_list
))
kumo_cloud_config
[
'software_release_url'
]
=
recipe
.
software_release_url
kumo_cloud_config
[
'server_url'
]
=
recipe
.
server_url
kumo_cloud_config
[
'key_file'
]
=
recipe
.
key_file
...
...
slapos/recipe/proactive/__init__.py
View file @
cb528baf
...
...
@@ -36,7 +36,7 @@ class Recipe(BaseSlapRecipe):
#ipv6 = self.getGlobalIPv6Address(parameter_dict)
proactive_home
=
self
.
options
[
'proactive_location'
]
# ProActive parameters
proactive_rmUrl
=
parameter_dict
.
get
(
'rmURL'
)
proactive_credential
=
parameter_dict
.
get
(
'credentials'
)
...
...
@@ -55,7 +55,7 @@ class Recipe(BaseSlapRecipe):
)
self
.
_writeFile
(
proactive_configuration_file
,
pkg_resources
.
resource_string
(
__name__
,
'template/ProActiveConfiguration.xml.in'
)
%
proactive_dict
)
# ProActive wrapper
#proactive = os.path.join(proactive_home, 'bin', 'unix', 'rm-start-node')
proactive_pa_bundle
=
os
.
path
.
join
(
proactive_home
,
'PABundle'
)
...
...
@@ -74,4 +74,4 @@ sh %(proactive)s %(rmUrl)s %(nsname)s %(credential)s
self
.
computer_partition
.
setConnectionDict
(
dict
(
#proactive_ip="[%s]" % (ipv6),
))
return
[
proactive_configuration_file
,
proactive_wrapper
]
\ No newline at end of file
return
[
proactive_configuration_file
,
proactive_wrapper
]
slapos/recipe/pulse2/__init__.py
View file @
cb528baf
...
...
@@ -43,17 +43,17 @@ class Recipe(BaseSlapRecipe):
document_root
=
self
.
createDataDirectory
(
'htdocs'
)
self
.
createHtdocs
(
self
.
options
[
'source'
].
strip
(),
document_root
)
url
=
self
.
installApache
(
document_root
)
# MySQL
mysql_conf
=
self
.
installMysqlServer
(
self
.
getLocalIPv4Address
(),
45678
)
# LDAP
ldap_port
=
dict
()
# Pulse
mmc_core_conf
=
self
.
installPulse2
(
ip
=
self
.
getLocalIPv4Address
(),
port
=
11000
,
ldap_host
=
ldap_conf
[
'host'
],
ldap_port
=
ldap_conf
[
'port'
])
ca_conf
=
self
.
installCertificateAuthority
()
key
,
certificate
=
self
.
requestCertificate
(
'Pulse'
)
...
...
@@ -61,7 +61,7 @@ class Recipe(BaseSlapRecipe):
self
.
getLocalIPv4Address
(),
12345
,
pulse_conf
[
'inventory_port'
],
certificate
,
key
,
ca_conf
[
'ca_crl'
],
ca_conf
[
'certificate_authority_path'
])
self
.
linkBinary
()
self
.
setConnectionDict
(
dict
(
stunnel_inventory_ip
=
stunnel_conf
[
'public_ip'
],
...
...
@@ -92,7 +92,7 @@ class Recipe(BaseSlapRecipe):
os
.
symlink
(
target
,
link
)
self
.
logger
.
debug
(
'Created link %r -> %r'
%
(
link
,
target
))
self
.
path_list
.
append
(
link
)
def
installCrond
(
self
):
timestamps
=
self
.
createDataDirectory
(
'cronstamps'
)
cron_output
=
os
.
path
.
join
(
self
.
log_directory
,
'cron-output'
)
...
...
@@ -114,7 +114,7 @@ class Recipe(BaseSlapRecipe):
)[
0
]
self
.
path_list
.
append
(
wrapper
)
return
cron_d
def
installLogrotate
(
self
):
"""Installs logortate main configuration file and registers its to cron"""
logrotate_d
=
os
.
path
.
abspath
(
os
.
path
.
join
(
self
.
etc_directory
,
...
...
@@ -247,26 +247,26 @@ class Recipe(BaseSlapRecipe):
ldap_logfile_path
=
os
.
path
.
join
(
self
.
log_directory
,
'ldap.log'
),
mmc_core_binary
=
self
.
options
[
'mmc_core_binary'
]
)
#TODO write function that takes all templates in subdir and creates conf
#TODO write function that takes all templates in subdir and creates conf
# files, keeping same dir structure.
mmc_conf_path
=
self
.
createConfigurationFile
(
os
.
path
.
join
(
"mmc"
,
"agent"
,
"config.ini"
),
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
os
.
path
.
join
(
"mmc_conf"
,
"agent"
,
"config.ini.in"
)),
config
))
config
[
'mmc_core_config_file'
]
=
mysql_conf_path
self
.
path_list
.
append
(
self
.
createRunningWrapper
(
'mmc-core'
,
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'mmc-core.in'
),
config
)))
return
dict
(
memcached_url
=
'%s:%s'
%
(
config
[
'memcached_ip'
],
config
[
'memcached_port'
]),
memcached_ip
=
config
[
'memcached_ip'
],
memcached_port
=
config
[
'memcached_port'
])
def
createHtdocs
(
self
,
source
,
document_root
):
source
=
self
.
options
[
'source'
].
strip
()
document_root
=
self
.
createDataDirectory
(
'htdocs'
)
...
...
@@ -282,7 +282,7 @@ class Recipe(BaseSlapRecipe):
shutil
.
copytree
(
path
,
os
.
path
.
join
(
document_root
,
p
))
else
:
shutil
.
copy2
(
path
,
os
.
path
.
join
(
document_root
,
p
))
def
installApache
(
self
,
document_root
,
ip
=
None
,
port
=
None
):
if
ip
is
None
:
ip
=
self
.
getGlobalIPv6Address
()
...
...
slapos/recipe/seleniumrunner/ERP5TypeFunctionalTestCase.py
View file @
cb528baf
...
...
@@ -27,7 +27,7 @@
#
##############################################################################
# XXX-Cedric : This is an import of
# XXX-Cedric : This is an import of
# http://git.erp5.org/gitweb/erp5.git/blob/HEAD:/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
# Modification of the present file should be ported back to this original file.
import
os
...
...
slapos/recipe/seleniumrunner/__init__.py
View file @
cb528baf
...
...
@@ -37,7 +37,7 @@ class Recipe(GenericBaseRecipe):
runner
=
self
.
createPythonScript
(
self
.
options
[
'runner-path'
],
__name__
+
'.testrunner.run'
,
arguments
=
[
self
.
options
[
'suite-url'
],
arguments
=
[
self
.
options
[
'suite-url'
],
self
.
options
[
'report-url'
],
self
.
options
[
'report-project'
],
self
.
options
[
'browser'
],
...
...
slapos/recipe/seleniumrunner/testrunner.py
View file @
cb528baf
...
...
@@ -57,7 +57,7 @@ def run(args):
# There is no test that can take more them 24 hours
timeout
=
2.0
*
60
*
60
while
True
:
erp5_report
=
ERP5TestReportHandler
(
report_url
,
project
+
'@'
+
config
[
'suite_name'
])
...
...
@@ -82,11 +82,11 @@ def run(args):
if
process
.
pid
:
os
.
kill
(
process
.
pid
,
signal
.
SIGTERM
)
print
(
"Test has finished and Firefox has been killed."
)
erp5_report
.
reportFinished
(
getStatus
(
config
[
'base_url'
]).
encode
(
"utf-8"
,
"replace"
))
print
(
"Test finished and report sent, sleeping."
)
except
urllib2
.
URLError
,
urlError
:
print
"Error: %s"
%
urlError
.
msg
...
...
slapos/recipe/sheepdogtestbed/__init__.py
View file @
cb528baf
...
...
@@ -49,23 +49,23 @@ class SheepDogTestBed(BaseSlapRecipe):
def
run_sheepdog_test
(
self
):
""" Launch sheepdog test process. """
sheepdog_test_config
=
{}
sheepdog_test_config
.
update
(
self
.
options
)
sheepdog_test_config
.
update
(
self
.
parameter_dict
)
sheepdog_test_config
[
'address'
]
=
self
.
getGlobalIPv6Address
()
sheepdog_test_config
[
'report_path'
]
=
self
.
log_directory
if
'nb_server_max'
not
in
sheepdog_test_config
:
sheepdog_test_config
[
'nb_server_max'
]
=
0
if
'nb_tester_max'
not
in
sheepdog_test_config
:
sheepdog_test_config
[
'nb_tester_max'
]
=
3
if
'nb_thread'
not
in
sheepdog_test_config
:
sheepdog_test_config
[
'nb_thread'
]
=
1
if
'nb_request'
not
in
sheepdog_test_config
:
sheepdog_test_config
[
'nb_request'
]
=
1000
...
...
@@ -81,7 +81,7 @@ class SheepDogTestBed(BaseSlapRecipe):
sheepdog_test_connection
=
{}
sheepdog_test_connection
[
'url'
]
=
"http://["
+
sheepdog_test_config
[
'address'
]
+
"]:5000/"
self
.
computer_partition
.
setConnectionDict
(
sheepdog_test_connection
)
nosqltester_manager_wrapper_template_location
=
pkg_resources
.
resource_filename
(
__name__
,
os
.
path
.
join
(
'template'
,
'nosqltester_manager_run.in'
))
...
...
slapos/recipe/siptester/__init__.py
View file @
cb528baf
...
...
@@ -11,7 +11,7 @@ class SipTesterRecipe(BaseSlapRecipe):
def
_createPJSUAConfiguration
(
self
,
template_name
):
pjsua_input
=
pkg_resources
.
resource_string
(
__name__
,
os
.
path
.
join
(
'template'
,
template_name
))
if
self
.
_writeFile
(
self
.
pjsua_configuration_file
,
if
self
.
_writeFile
(
self
.
pjsua_configuration_file
,
pjsua_input
%
self
.
options
):
# XXX: How to inform slap/slapgrid that something changed and it might
# be not bad idea to restart CP?
...
...
@@ -30,7 +30,7 @@ class SipTesterRecipe(BaseSlapRecipe):
d
[
'siptester_binary'
]
=
os
.
path
.
join
(
self
.
buildout
[
'software_definition'
][
'software_home'
].
strip
(),
'bin'
,
'siptester'
)
self
.
running_wrapper_location
=
pkg_resources
.
resource_filename
(
__name__
,
os
.
path
.
join
(
'template'
,
'template'
,
self
.
wrapper_template
))
self
.
_createRunningWrapper
(
d
)
return
[
path
,
wrapper_path
]
...
...
slapos/recipe/slaprunner/__init__.py
View file @
cb528baf
...
...
@@ -71,7 +71,7 @@ class Recipe(GenericBaseRecipe):
private_key
=
self
.
options
[
'private_key'
],
cloud9_url
=
self
.
cloud9_url
)
config_file
=
self
.
createFile
(
self
.
options
[
'slapos.cfg'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'slapos.cfg.in'
),
configuration
))
...
...
slapos/recipe/softwaretype.py
View file @
cb528baf
...
...
@@ -120,7 +120,7 @@ class Recipe:
self
.
getLocalIPv4Address
())
buildout
.
set
(
'slap-network-information'
,
'global-ipv6'
,
self
.
getGlobalIPv6Address
())
buildout
.
set
(
'slap-network-information'
,
'network-interface'
,
buildout
.
set
(
'slap-network-information'
,
'network-interface'
,
self
.
getNetworkInterface
())
# Copy/paste slap_connection
...
...
slapos/recipe/sphinx/__init__.py
View file @
cb528baf
...
...
@@ -42,15 +42,15 @@ class Recipe(GenericBaseRecipe):
pid
=
self
.
options
[
'pid'
],
)
sphinx_conf_path
=
self
.
createFile
(
self
.
options
[
'configuration-file'
],
self
.
options
[
'configuration-file'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'sphinx.conf.in'
),
config
)
)
# Create init script
wrapper
=
self
.
createPythonScript
(
self
.
options
[
'wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
self
.
options
[
'wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'sphinx-searchd-binary'
].
strip
(),
'-c'
,
sphinx_conf_path
,
'--nodetach'
],
)
...
...
software/net2ftp/configure.py
View file @
cb528baf
...
...
@@ -4,7 +4,7 @@ import MySQLdb
def
setup
(
args
):
mysql_port
,
mysql_host
,
mysql_user
,
mysql_password
,
mysql_database
,
base_url
,
htdocs
=
args
sql_file
=
os
.
path
.
join
(
htdocs
,
"create_tables.sql"
)
try
:
conn
=
MySQLdb
.
connect
(
host
=
mysql_host
,
...
...
@@ -19,7 +19,7 @@ def setup(args):
sql_script
=
f
.
readline
()
conn
.
close
()
except
:
return
return
if
__name__
==
'__main__'
:
setup
(
sys
.
argv
[
1
:])
\ No newline at end of file
setup
(
sys
.
argv
[
1
:])
software/zencart/configure.py
View file @
cb528baf
...
...
@@ -4,7 +4,7 @@ import fileinput
def
setup
(
args
):
mysql_port
,
mysql_host
,
mysql_user
,
mysql_password
,
mysql_database
,
base_url
,
htdocs
=
args
admin_dir
=
"admin-"
+
mysql_user
admin_include_file
=
os
.
path
.
join
(
htdocs
,
admin_dir
+
"/includes/configure.php"
)
searchPattern
=
"/admin"
...
...
@@ -17,4 +17,4 @@ def setup(args):
os
.
chmod
(
admin_include_file
,
0444
)
if
__name__
==
'__main__'
:
setup
(
sys
.
argv
[
1
:])
\ No newline at end of file
setup
(
sys
.
argv
[
1
:])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment