aboutsummaryrefslogtreecommitdiff
path: root/cli/onionshare_cli/onionshare.py
diff options
context:
space:
mode:
authorMiguel Jacq <mig@mig5.net>2021-05-04 16:21:42 +1000
committerMiguel Jacq <mig@mig5.net>2021-05-04 16:21:42 +1000
commit04019389dad4fc1b7311fbfe77b412e0c576c143 (patch)
treec17cc6d254583b784a2a6aa9353572365a24e139 /cli/onionshare_cli/onionshare.py
parent659ed83853a6e68d9509a7e5f59a38713f02c1e0 (diff)
downloadonionshare-04019389dad4fc1b7311fbfe77b412e0c576c143.tar.gz
onionshare-04019389dad4fc1b7311fbfe77b412e0c576c143.zip
Move the cleanup() function from Onionshare class to Web class, so that the list of files to be cleaned up is always available (needed for website temp files)
Diffstat (limited to 'cli/onionshare_cli/onionshare.py')
-rw-r--r--cli/onionshare_cli/onionshare.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/cli/onionshare_cli/onionshare.py b/cli/onionshare_cli/onionshare.py
index e518d2fb..bd94100f 100644
--- a/cli/onionshare_cli/onionshare.py
+++ b/cli/onionshare_cli/onionshare.py
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import os
-import shutil
from .common import AutoStopTimer
@@ -89,21 +88,3 @@ class OnionShare(object):
Stop the onion service
"""
self.onion.stop_onion_service(mode_settings)
-
- def cleanup(self):
- """
- Shut everything down and clean up temporary files, etc.
- """
- self.common.log("OnionShare", "cleanup")
-
- # Cleanup files
- try:
- for filename in self.cleanup_filenames:
- if os.path.isfile(filename):
- os.remove(filename)
- elif os.path.isdir(filename):
- shutil.rmtree(filename)
- except Exception:
- # Don't crash if file is still in use
- pass
- self.cleanup_filenames = []