Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove uploaded files

  • Loading branch information...
commit 59efde051e28d0f40f0c6455fac20afc683fc0a9 1 parent cb22ead
@sickill sickill authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 bin/asciiio.py
View
6 bin/asciiio.py
@@ -19,6 +19,7 @@
import bz2
import ConfigParser
import uuid
+import shutil
SCRIPT_NAME = os.path.basename(sys.argv[0])
BASE_DIR = os.path.expanduser("~/.ascii.io")
@@ -296,12 +297,17 @@ def upload(self):
# print >> sys.stderr, stderr
# sys.stderr.write(stderr)
os.write(2, stderr)
+ else:
+ self._remove_files()
if stdout:
return stdout
else:
return None
+ def _remove_files(self):
+ shutil.rmtree(self.path)
+
def check_pending():
num = len(pending_list())
Please sign in to comment.
Something went wrong with that request. Please try again.