Skip to content

filemanager: GDP Move to Trash #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
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
5 changes: 5 additions & 0 deletions mig/shared/functionality/rm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
Expand All @@ -20,12 +20,12 @@
#
# 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/shared/functionality/rm.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (81 > 80 characters)
#
# -- END_HEADER ---
#

"""Module that enables a user to delete files and directories

Check warning on line 28 in mig/shared/functionality/rm.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

First line should end with a period (not 's')

Check warning on line 28 in mig/shared/functionality/rm.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

1 blank line required between summary line and description (found 0)
in his home directory.
It is possible to supply a recursive flag to enable recursive deletes.
"""
Expand Down Expand Up @@ -53,7 +53,7 @@


def signature():
"""Signature of the main function"""

Check warning on line 56 in mig/shared/functionality/rm.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

First line should end with a period (not 'n')

Check warning on line 56 in mig/shared/functionality/rm.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

No blank lines allowed after function docstring (found 1)

defaults = {
'flags': [''],
Expand All @@ -66,8 +66,8 @@
return ['', defaults]


def main(client_id, user_arguments_dict, environ=None):

Check failure on line 69 in mig/shared/functionality/rm.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused function 'main' (60% confidence)
"""Main function used by front end"""

Check warning on line 70 in mig/shared/functionality/rm.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

First line should be in imperative mood; try rephrasing (found 'Main')

Check warning on line 70 in mig/shared/functionality/rm.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

First line should end with a period (not 'd')

Check warning on line 70 in mig/shared/functionality/rm.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

No blank lines allowed after function docstring (found 1)

if environ is None:
environ = os.environ
Expand All @@ -75,7 +75,7 @@
(configuration, logger, output_objects, op_name) = \
initialize_main_variables(client_id, op_header=False,
op_menu=client_id)
client_dir = client_id_dir(client_id)

Check failure on line 78 in mig/shared/functionality/rm.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused variable 'client_dir' (60% confidence)
status = returnvalues.OK
defaults = signature()[1]
(validate_status, accepted) = validate_input(
Expand Down Expand Up @@ -317,9 +317,14 @@
get_trash_location(configuration, abs_path, True)
trash_relative_path = \
trash_base_path.replace(configuration.user_home, '')
# Legacy vgrids use 'vgrid_files_home' as data storage
trash_relative_path = \
trash_relative_path.replace(
configuration.vgrid_files_home, '')
# Current vgrids use 'vgrid_files_writable' as data storage
trash_relative_path = \
trash_relative_path.replace(
configuration.vgrid_files_writable, '')
gdp_iolog_paths.append(trash_relative_path)
try:
gdp_iolog(configuration,
Expand Down