summaryrefslogtreecommitdiff
path: root/import-layers/yocto-poky/bitbake/lib/toaster/contrib/tts/recv.py
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-01 18:27:11 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-03-13 05:51:39 +0300
commit6e60e8b2b2bab889379b380a28a167a0edd9d1d3 (patch)
treef12f54d5ba8e74e67e5fad3651a1e125bb8f4191 /import-layers/yocto-poky/bitbake/lib/toaster/contrib/tts/recv.py
parent509842add85b53e13164c1569a1fd43d5b8d91c5 (diff)
downloadopenbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.tar.xz
Yocto 2.3
Move OpenBMC to Yocto 2.3(pyro). Tested: Built and verified Witherspoon and Palmetto images Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Resolves: openbmc/openbmc#2461
Diffstat (limited to 'import-layers/yocto-poky/bitbake/lib/toaster/contrib/tts/recv.py')
-rwxr-xr-ximport-layers/yocto-poky/bitbake/lib/toaster/contrib/tts/recv.py56
1 files changed, 0 insertions, 56 deletions
diff --git a/import-layers/yocto-poky/bitbake/lib/toaster/contrib/tts/recv.py b/import-layers/yocto-poky/bitbake/lib/toaster/contrib/tts/recv.py
deleted file mode 100755
index 07efdac44..000000000
--- a/import-layers/yocto-poky/bitbake/lib/toaster/contrib/tts/recv.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/python
-
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (C) 2015 Alexandru Damian for Intel Corp.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# Program to receive review requests by email and log tasks to backlog.txt
-# Designed to be run by the email system from a .forward file:
-#
-# cat .forward
-# |[full/path]/recv.py
-
-from __future__ import print_function
-import sys, config, shellutils
-
-from email.parser import Parser
-
-def recv_mail(datastring):
- headers = Parser().parsestr(datastring)
- return headers['subject']
-
-def main():
- lock_file = shellutils.lockfile(shellutils.mk_lock_filename(), retry=True)
-
- if lock_file is None:
- if config.DEBUG:
- print("Concurrent script in progress, exiting")
- sys.exit(1)
-
- subject = recv_mail(sys.stdin.read())
-
- subject_parts = subject.split()
- if "[review-request]" in subject_parts:
- task_name = subject_parts[subject_parts.index("[review-request]") + 1]
- with open(config.BACKLOGFILE, "a") as fout:
- line = "%s|%s\n" % (task_name, config.TASKS.PENDING)
- fout.write(line)
-
- shellutils.unlockfile(lock_file)
-
-if __name__ == "__main__":
- main()