summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-08-04 20:12:31 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-08-04 20:12:31 +0000
commit35aa9387def8672e8c1cf667f2fc15cef888f46a (patch)
tree6f4a5f60c897c9da8de3286e146f59a38e2c7d57
parentStore Python version in /etc/env.d/python/config. (diff)
downloadeselect-python-35aa9387def8672e8c1cf667f2fc15cef888f46a.tar.gz
eselect-python-35aa9387def8672e8c1cf667f2fc15cef888f46a.tar.bz2
eselect-python-35aa9387def8672e8c1cf667f2fc15cef888f46a.zip
Add a variable, whose content is used to check validity of python program.
-rw-r--r--python.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/python.c b/python.c
index dd1bc8b..1748547 100644
--- a/python.c
+++ b/python.c
@@ -14,6 +14,8 @@
/* 127 is the standard return code for "command not found" */
#define EXIT_ERROR 127
+const char* program_description = "Gentoo Python wrapper program";
+
char* dir_cat(const char* dir, const char* file)
{
size_t dir_len = strlen(dir);
@@ -160,6 +162,9 @@ const char* find_latest(const char* exe)
int main(int argc, char** argv)
{
+ if (strlen(program_description) == 0)
+ abort();
+
const char* EPYTHON = getenv("EPYTHON");
if (! valid_interpreter(EPYTHON))
{