Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
Removed unused enumerate.
Browse files Browse the repository at this point in the history
  • Loading branch information
tacozMacleo committed May 13, 2020
1 parent ac5c586 commit 5740c45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist = py{35, 36, 37}, flake8, pydoc
envlist = py{35, 36, 37, 38}, flake8, pydoc
skip_missing_interpreters = true

[testenv]
Expand Down Expand Up @@ -49,4 +49,5 @@ max-line-length = 120
python =
3.5: py35
3.6: py36
3.7: py37, pydoc, flake8
3.7: py37
3.8: py38, pydoc, flake8
4 changes: 2 additions & 2 deletions wappsto/connection/event_storage.py
Expand Up @@ -127,7 +127,7 @@ def get_logs(self):
"""
file_list = os.listdir(self.log_location)
pattern = "[0-9][0-9][0-9][0-9]-([0-9]|1[0-2])"
return [file_name for id, file_name in enumerate(file_list) if re.search(pattern, file_name)]
return [file_name for file_name in file_list if re.search(pattern, file_name)]

def compact_logs(self):
"""
Expand All @@ -138,7 +138,7 @@ def compact_logs(self):
"""
all_logs = self.get_logs()
text_logs = [file_name for id, file_name in enumerate(all_logs) if re.search(".txt$", file_name)]
text_logs = [file_name for file_name in all_logs if re.search(".txt$", file_name)]
for file_name in text_logs:
file_path = self.get_file_path(file_name)
with zipfile.ZipFile(file_path.replace(".txt", ".zip"), "w") as zip_file:
Expand Down

0 comments on commit 5740c45

Please sign in to comment.