diff options
author | Damien George <damien.p.george@gmail.com> | 2019-04-26 15:21:09 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-04-26 15:21:09 +1000 |
commit | 06a532c227c2f37fc190deb84970fdfeaaf37d6a (patch) | |
tree | 69fb415403bdc2bb4197e35713361a6b0882db13 /lib/utils/pyexec.h | |
parent | 775ffdcc3b85178ac128f774a5a8f992fd637dca (diff) |
lib/utils/pyexec: Add pyexec_file_if_exists() helper function.
It will only execute the script if it can be stat'd and is a file.
Diffstat (limited to 'lib/utils/pyexec.h')
-rw-r--r-- | lib/utils/pyexec.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/utils/pyexec.h b/lib/utils/pyexec.h index a0d0b52b1..9eb490be5 100644 --- a/lib/utils/pyexec.h +++ b/lib/utils/pyexec.h @@ -46,6 +46,7 @@ extern int pyexec_system_exit; int pyexec_raw_repl(void); int pyexec_friendly_repl(void); int pyexec_file(const char *filename); +int pyexec_file_if_exists(const char *filename); int pyexec_frozen_module(const char *name); void pyexec_event_repl_init(void); int pyexec_event_repl_process_char(int c); |