Skip to content
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

fixing instances of string appending with + #39

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions filemanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def rename_if_exists(self, folder, file):
full_path = folder + name + '.' + str(i) + extension
if not os.path.exists(full_path):
break
return name + '.' + str(i) + extension
return "{0}.{1}{2}".format(name, str(i), extension)

This comment was marked as outdated.

This comment was marked as outdated.

else:
return file

Expand Down Expand Up @@ -106,7 +106,7 @@ def handle_form(self, form, files):
and not re.match(r'[\w\d_ -]+', name).group(0) == name
)
if invalid_folder_name:
messages.append("Invalid folder name : " + name)
messages.append('{0}{1}'.format("Invalid folder name : ", name))

This comment was marked as outdated.

This comment was marked as outdated.

return messages

invalid_file_name = (
Expand Down