Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mig/install/generateconfs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
Expand All @@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Check warning on line 23 in mig/install/generateconfs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (81 > 80 characters)

Check warning on line 23 in mig/install/generateconfs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (81 > 80 characters)
#
# -- END_HEADER ---
#
Expand All @@ -47,7 +47,7 @@

# NOTE: moved mig imports into try/except to avoid autopep8 moving to top!
try:
from mig.shared.defaults import MIG_BASE, MIG_ENV

Check failure on line 50 in mig/install/generateconfs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused import 'MIG_ENV' (90% confidence)

Check failure on line 50 in mig/install/generateconfs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused import 'MIG_ENV' (90% confidence)
from mig.shared.install import generate_confs
except ImportError:
print("ERROR: the migrid modules must be in PYTHONPATH")
Expand All @@ -65,7 +65,7 @@
''' % (sys.argv[0], '\n'.join(lines)))


def main(argv, _generate_confs=generate_confs, _print=print):

Check warning on line 68 in mig/install/generateconfs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Missing docstring in public function

Check warning on line 68 in mig/install/generateconfs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Missing docstring in public function
str_names = [
'source',
'destination',
Expand Down Expand Up @@ -283,6 +283,7 @@
'enable_cloud',
'enable_gdp',
'enable_hsts',
'enable_antislowloris',
'enable_vhost_certs',
'enable_verify_certs',
'enable_seafile',
Expand All @@ -309,7 +310,7 @@
'gdp_email_notify',
]
names = str_names + int_names + bool_names
settings, options, result = {}, {}, {}

Check failure on line 313 in mig/install/generateconfs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused variable 'result' (60% confidence)

Check failure on line 313 in mig/install/generateconfs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused variable 'result' (60% confidence)
default_val = 'DEFAULT'
# Force values to expected type
for key in names:
Expand Down Expand Up @@ -385,7 +386,7 @@
if val == 'DEFAULT':
del settings[key]

(options, result) = _generate_confs(output_path, **settings)

Check failure on line 389 in mig/install/generateconfs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused variable 'result' (60% confidence)

Check failure on line 389 in mig/install/generateconfs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused variable 'result' (60% confidence)

# TODO: avoid reconstructing this path (also done inside generate_confs)
instructions_path = os.path.join(options['destination_dir'],
Expand Down