Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-12-24 10:39:24 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-12-24 10:39:24 (GMT)
commita927ca8cf22c89eb1c3b1cb2798b8f94c87bd049 (patch)
tree4b6cb3ce19e6c77445007319193d464b1c8f1e78 /devbot
parentaf22628659337690ff19a7ff8458eeef5ffc6e7e (diff)
Remove the announce file from remote host
Diffstat (limited to 'devbot')
-rw-r--r--devbot/release.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/devbot/release.py b/devbot/release.py
index 0139e14..a9f5a64 100644
--- a/devbot/release.py
+++ b/devbot/release.py
@@ -18,7 +18,7 @@ def upload(module, path):
return subprocess.call(["scp", path, upload_dest]) == 0
def announce(module, filename, version, annotation):
- fd, announce_path = tempfile.mkstemp("announce-")
+ fd, announce_path = tempfile.mkstemp(prefix="announce-")
with os.fdopen(fd, "w") as f:
f.write("From: %s\n" % _get_email())
@@ -33,10 +33,14 @@ def announce(module, filename, version, annotation):
upload_dest = "%s:~" % upload_host
if subprocess.call(["scp", announce_path, upload_dest]) == 0:
+ announce_basename = os.path.basename(announce_path)
+
if subprocess.call(["ssh", upload_host, "sendmail", "-t",
- "<", os.path.basename(announce_path)]):
+ "<", announce_basename]):
result = True
+ subprocess.check_call(["ssh", upload_host, "rm", announce_basename])
+
os.unlink(announce_path)
return result