summaryrefslogtreecommitdiffstats
path: root/src/plugins/abrt-action-analyze-python.c
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-05-04 14:39:37 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2011-05-04 14:39:37 +0200
commit58e7efce3d5ac71e308e7e44176473cd66e8ad26 (patch)
treed4822587940487f2910e925990a55377e60e05bd /src/plugins/abrt-action-analyze-python.c
parent27e7d86db7c6c96e8da75e8e8dda6359b9e73c41 (diff)
downloadabrt-58e7efce3d5ac71e308e7e44176473cd66e8ad26.tar.gz
abrt-58e7efce3d5ac71e308e7e44176473cd66e8ad26.tar.xz
abrt-58e7efce3d5ac71e308e7e44176473cd66e8ad26.zip
move $ABRT_foo checking and setting into helper routines.
I'm sick of fixing incorrect PROGNAME defines. Now g_progname is a variable and it is set from argv[0]. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/plugins/abrt-action-analyze-python.c')
-rw-r--r--src/plugins/abrt-action-analyze-python.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/plugins/abrt-action-analyze-python.c b/src/plugins/abrt-action-analyze-python.c
index 07f14a32..5a33fb8d 100644
--- a/src/plugins/abrt-action-analyze-python.c
+++ b/src/plugins/abrt-action-analyze-python.c
@@ -19,19 +19,15 @@
#include "abrtlib.h"
#include "parse_options.h"
-#define PROGNAME "abrt-action-analyze-python"
-
int main(int argc, char **argv)
{
- char *env_verbose = getenv("ABRT_VERBOSE");
- if (env_verbose)
- g_verbose = atoi(env_verbose);
+ abrt_init(argv);
const char *dump_dir_name = ".";
/* Can't keep these strings/structs static: _() doesn't support that */
const char *program_usage_string = _(
- PROGNAME" [-v] -d DIR\n"
+ "\b [-v] -d DIR\n"
"\n"
"Calculates and saves UUID and DUPHASH of python crash dumps"
);
@@ -47,11 +43,7 @@ int main(int argc, char **argv)
};
/*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string);
- putenv(xasprintf("ABRT_VERBOSE=%u", g_verbose));
-
- char *pfx = getenv("ABRT_PROG_PREFIX");
- if (pfx && string_to_bool(pfx))
- msg_prefix = PROGNAME;
+ export_abrt_envvars(0);
struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
if (!dd)