Skip to content

Commit

Permalink
remove checks for PY_VERSION_HEX < VERSION_HEX(3, 0, 0)
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz authored and BareosBot committed Aug 24, 2023
1 parent 85f9b59 commit df32720
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 38 deletions.
6 changes: 1 addition & 5 deletions core/src/plugins/dird/python/module/bareosdir.cc
Expand Up @@ -35,11 +35,7 @@

#include "include/version_hex.h"

#if PY_VERSION_HEX < VERSION_HEX(3, 0, 0)
# define LOGPREFIX "python-dir-mod: "
#else
# define LOGPREFIX "python3-dir-mod: "
#endif
#define LOGPREFIX "python3-dir-mod: "

#include "dird/dird.h"
#include "dird/dir_plugins.h"
Expand Down
9 changes: 2 additions & 7 deletions core/src/plugins/dird/python/python-dir.cc
Expand Up @@ -37,13 +37,8 @@

#define PLUGIN_DAEMON "dir"

#if PY_VERSION_HEX < VERSION_HEX(3, 0, 0)
# define PLUGIN_NAME "python"
# define PLUGIN_DIR PY2MODDIR
#else
# define PLUGIN_NAME "python3"
# define PLUGIN_DIR PY3MODDIR
#endif
#define PLUGIN_NAME "python3"
#define PLUGIN_DIR PY3MODDIR
#define LOGPREFIX PLUGIN_NAME "-" PLUGIN_DAEMON ": "

#include "dird/dird.h"
Expand Down
7 changes: 1 addition & 6 deletions core/src/plugins/filed/python/module/bareosfd.cc
Expand Up @@ -35,12 +35,7 @@

#include "include/version_hex.h"

#if PY_VERSION_HEX < VERSION_HEX(3, 0, 0)
# define LOGPREFIX "python-fd-mod: "
#else
# define LOGPREFIX "python3-fd-mod: "
#endif

#define LOGPREFIX "python3-fd-mod: "

#include "filed/fd_plugins.h"

Expand Down
9 changes: 2 additions & 7 deletions core/src/plugins/filed/python/python-fd.cc
Expand Up @@ -37,13 +37,8 @@

#define PLUGIN_DAEMON "fd"

#if PY_VERSION_HEX < VERSION_HEX(3, 0, 0)
# define PLUGIN_NAME "python"
# define PLUGIN_DIR PY2MODDIR
#else
# define PLUGIN_NAME "python3"
# define PLUGIN_DIR PY3MODDIR
#endif
#define PLUGIN_NAME "python3"
#define PLUGIN_DIR PY3MODDIR
#define LOGPREFIX PLUGIN_NAME "-" PLUGIN_DAEMON ": "

#include "filed/fd_plugins.h"
Expand Down
7 changes: 1 addition & 6 deletions core/src/plugins/stored/python/module/bareossd.cc
Expand Up @@ -35,12 +35,7 @@

#include "include/version_hex.h"

#if PY_VERSION_HEX < VERSION_HEX(3, 0, 0)
# define LOGPREFIX "python-sd-mod: "
#else
# define LOGPREFIX "python3-sd-mod: "
#endif

#define LOGPREFIX "python3-sd-mod: "

#include "filed/fd_plugins.h"

Expand Down
9 changes: 2 additions & 7 deletions core/src/plugins/stored/python/python-sd.cc
Expand Up @@ -37,13 +37,8 @@

#define PLUGIN_DAEMON "sd"

#if PY_VERSION_HEX < VERSION_HEX(3, 0, 0)
# define PLUGIN_NAME "python"
# define PLUGIN_DIR PY2MODDIR
#else
# define PLUGIN_NAME "python3"
# define PLUGIN_DIR PY3MODDIR
#endif
#define PLUGIN_NAME "python3"
#define PLUGIN_DIR PY3MODDIR

#define LOGPREFIX PLUGIN_NAME "-" PLUGIN_DAEMON ": "

Expand Down

0 comments on commit df32720

Please sign in to comment.